public class EntityListDatasource extends AbstractListDatasource
EntityListDatasource
provides a IListDatasource
implementation to manage and represent a data model based on the
IEntity
s defined in the application model. This datasource is to be
used in ListView
s.Constructor and Description |
---|
EntityListDatasource() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getExpressionValue(java.lang.String rootExpression)
This method is used to retrieve an object from the data model using an
expression.
An expression can be any String an IDatasource implementation
uses to reference an object. |
java.lang.Object |
getExpressionValue(java.lang.String relativeExpression,
int elementIndex)
This method is used to get the object from the data model using an expression
that is relative to on object in the data model with the given row
index.
An expression can be any String an IDatasource implementation
uses to reference an object. |
boolean |
matchesExpression(java.lang.String filterExpression,
int elementIndex)
Returns a boolean value indicating whether the passed
filterExpression is applicable for the underlying element,
represented by it's elementIndex . |
void |
reloadElements()
Use to reload the objects managed by the datasource.
|
void |
setExpressionValue(java.lang.String rootExpression,
java.lang.Object value)
This method is used to update an object in the data model.
An expression can be any String an IDatasource implementation
uses to reference an object. |
void |
setExpressionValue(java.lang.String relativeExpression,
java.lang.Object value,
int elementIndex)
This method is used to set the object in the data model using an expression
that is relative to on object in the data model with the given row
index.
An expression can be any String an IDatasource implementation
uses to reference an object. |
addElement, addElementAtIndex, addElements, compare, getComparator, getElementAtIndex, getElements, getException, getFilteredElements, getFilterExpression, getNumberOfElements, getSelectedElement, hasException, isFilteredElement, removeAllElements, removeElement, removeElementAtIndex, resort, setComparator, setElements, setFilterExpression, setSelectedElement
addObserver, deleteObserver, notifyObservers, notifyObservers
public java.lang.Object getExpressionValue(java.lang.String relativeExpression, int elementIndex) throws java.lang.Exception
IListDatasource
IDatasource
implementation
uses to reference an object.elementIndex
- the index of the object to be used to evaluate the given
expressionnull
if there was
no objectjava.lang.Exception
- if an error occured evaluating the given expressionpublic void setExpressionValue(java.lang.String relativeExpression, java.lang.Object value, int elementIndex) throws java.lang.Exception
IListDatasource
IDatasource
implementation
uses to reference an object.relativeExpression
- String that references an object in the data modelvalue
- the new value for the given expressionelementIndex
- the index of the object to be used to evaluate the
given expressionjava.lang.Exception
- if an error occured evaluating the given expressionpublic boolean matchesExpression(java.lang.String filterExpression, int elementIndex)
IListDatasource
filterExpression
is applicable for the underlying element,
represented by it's elementIndex
. elementIndex
is out of range.
This method is used to determine the expression to template mapping used in ContentAdapter.
filterExpression
- String that references an object in the data modelelementIndex
- the index of the object to be used to evaluate the
given expressionpublic java.lang.Object getExpressionValue(java.lang.String rootExpression) throws java.lang.Exception
IDatasource
IDatasource
implementation
uses to reference an object.rootExpression
- String that references an object in the data modelnull
if there was
no objectjava.lang.Exception
- if an error occured evaluating the given expressionpublic void setExpressionValue(java.lang.String rootExpression, java.lang.Object value) throws java.lang.Exception
IDatasource
IDatasource
implementation
uses to reference an object.rootExpression
- String that references an object in the data modelvalue
- new object value for the given expressionjava.lang.Exception
- if an error occured evaluating the given expressionpublic void reloadElements()
IListDatasource
reloadElements
in interface IListDatasource
reloadElements
in class AbstractListDatasource