|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.list.AbstractListModel
com.sptci.echo.list.ListModel<D>
com.sptci.echo.list.JDOListModel<D>
D - The class name of the model object backing this list model.public class JDOListModel<D extends JDOObject>
A list model for holding model objects are are persisted using JDO.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Field Summary |
|---|
| Fields inherited from class com.sptci.echo.list.ListModel |
|---|
data, field, nameMap |
| Constructor Summary | |
|---|---|
protected |
JDOListModel()
Default constructor. |
|
JDOListModel(Collection<D> data,
String field)
Create a new instance of the list model for the specified collection of persistent model objects. |
|
JDOListModel(D model,
String field)
Create a new instance of the list model using the specified values. |
| Method Summary | |
|---|---|
void |
add(D model)
Add the specified value object to the list model. |
void |
addAll(Collection<D> data)
Add the specified collection of objects to the model. |
protected Object |
getObjectId(D model)
Return the persistent object id for the persistent object specified. |
protected Object |
getObjectId(int index)
Return the persistent object id for the object at the specified index in ListModel.data. |
int |
indexById(Object oid)
Return the index of the specified persistent object id. |
protected void |
init(D model)
Initialise the list model using the dummy instance. |
void |
remove(D model)
Remove the specified model object from the list model. |
| Methods inherited from class com.sptci.echo.list.ListModel |
|---|
get, getData, getObject, getValue, getValue, indexByName, setData, size |
| Methods inherited from class nextapp.echo.app.list.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getEventListenerList, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JDOListModel()
public JDOListModel(D model,
String field)
model - An empty model object used to automatically initialise
the list model through standard queries to the data store. This is
necessiated by poor generics implementation in java.field - The name of the field in the model object used to
display in the list component.
public JDOListModel(Collection<D> data,
String field)
data - The collection of objects to represent.field - The field in the model object whose value is to be
displayed in the list component.| Method Detail |
|---|
protected void init(D model)
model - The model object used for introspection.protected Object getObjectId(int index)
ListModel.data.
index - The index of the model object.
getObjectId( JDOObject )protected Object getObjectId(D model)
model - The model object whose persistent object id is to be
retrieved.
public int indexById(Object oid)
oid - The persistent object id for the model object.
public void addAll(Collection<D> data)
idMap.
addAll in class ListModel<D extends JDOObject>data - The collection of objects to add to ListModel.data.ListModel.addAll(java.util.Collection) ,
getObjectId(int)public void add(D model)
idMap.
add in class ListModel<D extends JDOObject>model - The model object that is to be added to this list model.ListModel.add(D)public void remove(D model)
idMap.
remove in class ListModel<D extends JDOObject>model - The object to be removed.ListModel.remove(D)
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||