|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface DFResultSet.VertexState
This object represent state of data of one DFDataTree.Vertex. Each VertexState
has these properties: all ids, sort directive, row selection.
| Field Summary | |
|---|---|
static String |
PROP_IDS
|
static String |
PROP_SELECTION
|
static String |
PROP_SORT
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Register PropertyChangeListener to this VertexState to be notified about ids, sort and selection changes. |
Map<Comparable<?>,Map<String,Object>> |
getData(List<? extends Comparable<?>> ids,
DFEnvironmentRO env)
Fetch data for these IDs. |
Comparable<?> |
getIdAt(int index)
Get id (primary key) at the specific position. |
List<? extends Comparable<?>> |
getIds()
Get list of all IDs (primary keys values) of all rows in this VertexState. |
List<? extends Comparable<?>> |
getIdsForParentId(Comparable<?> parentRowId,
DFEnvironmentRO env)
Get list of all IDs (primary key values) of rows in this VertexState for specific parent row ID. |
DFResultSet |
getResultSet()
Get the DFResultSet this VertexState belongs to. |
List<? extends Comparable<?>> |
getSelectedRowsIds()
Get the list of row IDs for selected rows. |
SelectionDescription |
getSelection()
Get the current selection descriptor. |
int |
getSize()
Get number of rows at this level of result set at this moment. |
SortDirective |
getSort()
Get the current sort directive. |
DFDataTree.Vertex |
getVertex()
Get the vertex (static DDL object) for this VertexState (dynamic data DML object). |
Map<Comparable<?>,Map<String,Object>> |
getWrappedData(List<? extends Comparable<?>> ids,
DFEnvironmentRO env)
|
int |
indexOfId(Comparable<?> id)
Return the index of the given id, if it's part of current vertex state. |
void |
insertId(Comparable<?> id,
boolean selectIt,
DFEnvironmentRW env)
Insert a new row (with the specified id = primary key) to this VertexState. |
void |
removeIds(List<? extends Comparable<?>> idsToRemove,
DFEnvironmentRW env)
Remove the rows (with the specified ids = primary key) from this VertexState. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Unregister PropertyChangeListener from this VertexState. |
void |
setSelection(SelectionDescription selection,
DFEnvironmentRW env)
Set selection on this level of result set. |
void |
setSort(SortDirective sort,
DFEnvironmentRW env)
Set sort on this level of result set. |
| Field Detail |
|---|
static final String PROP_IDS
static final String PROP_SORT
static final String PROP_SELECTION
| Method Detail |
|---|
DFResultSet getResultSet()
DFDataTree.Vertex getVertex()
int getSize()
List<? extends Comparable<?>> getIds()
LinkedHashSet.
List<? extends Comparable<?>> getIdsForParentId(Comparable<?> parentRowId,
DFEnvironmentRO env)
parentRowId - Parent row ID (primary key value)env - The environment
IllegalStateException - when it's called for the root VertexState (for which it has no meaning).
It only works for detail VertexStates.
IllegalArgumentException - when parentRowId is of wrong type or is nullList<? extends Comparable<?>> getSelectedRowsIds()
LinkedHashSet.
null.Comparable<?> getIdAt(int index)
index -
int indexOfId(Comparable<?> id)
id - The row id which you are looking for
void insertId(Comparable<?> id,
boolean selectIt,
DFEnvironmentRW env)
DFEntityDataProvider should be used instead), but it should just add existing id.
The new id (row) is added and will be in vertex state just till whole ids list is set again.
For root vertex it means when applyList or applyQuery is called, for any child vertex it means
when parent vertex changes the selection.
id - The primary key of the row to be added to VertexStateselectIt - If true, the newly added row will be selected (PROP_SELECTION)env - The environment
void removeIds(List<? extends Comparable<?>> idsToRemove,
DFEnvironmentRW env)
DFEntityDataProvider.deleteIds(List, DFEnvironmentRW)
method instead.
This change is not permanent. If you remove row using this method from root vertex then it's added again when query is executed again. For detail vertex (detail entity) row is added again only if you change selection in parent vertex (e.g. you go one row down and back up in master table).
idsToRemove - The primary key values of the rows to be removed from VertexStateenv - The environment
void setSort(SortDirective sort,
DFEnvironmentRW env)
sort - The sort directiveenv - The environmentSortDirective getSort()
void setSelection(SelectionDescription selection,
DFEnvironmentRW env)
selection - The selection descriptorenv - The environmentSelectionDescription getSelection()
SelectionDescription uses indexes so should be used
carefully. Selection[min=0, max=1] change the meaning when DFResultSet rows are updated, e.g. after a
query is executed.
Map<Comparable<?>,Map<String,Object>> getData(List<? extends Comparable<?>> ids,
DFEnvironmentRO env)
ids - The IDsenv - The environment
Map<Comparable<?>,Map<String,Object>> getWrappedData(List<? extends Comparable<?>> ids,
DFEnvironmentRO env)
void addPropertyChangeListener(PropertyChangeListener l)
l - The PropertyChangeListenervoid removePropertyChangeListener(PropertyChangeListener l)
l - The PropertyChangeListener
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||