net.infordata.ifw2.web.grds
Interface IPojoGridModel<C>

All Superinterfaces:
IGridModel, java.io.Serializable
All Known Subinterfaces:
IJpaFolderModel<C>, IJpaGridModel<C>, IPojoEditableGridModel<C>
All Known Implementing Classes:
AJpaDataGridModel, AJpaEditableDataGridModel, AJpaEditableFolderModel, AJpaEditableGridModel, AJpaFolderModel, AJpaGridModel, APojoCrossModel, APojoEditableDataGridModel, APojoEditableGridModel, APojoGridModel, EnumModel, PojoDataGridModel, PojoGridModel, PojoGroupingModel

public interface IPojoGridModel<C>
extends IGridModel


Method Summary
 C getCurrentPojo()
           
 int getDataVersion()
           
 java.util.List<C> getDataView()
           
 C getPojo(int rowIndex)
           
 java.lang.Class<C> getPojoType()
           
 java.lang.String getPropertyName(int columnIndex)
           
 java.lang.Object getValue(C pojo, int columnIndex)
           
 int rowIndexOf(C pojo)
           
 
Methods inherited from interface net.infordata.ifw2.web.grds.IGridModel
fetchRows, getColumn, getColumnCount, getColumnGroup, getColumnIndex, getColumnName, getCurrentRow, getCurrentRowCount, getRowCount, getValueAt, isCurrentRowFreezed, setCurrentRow, sync
 

Method Detail

getPojo

C getPojo(int rowIndex)
          throws OutOfBoundsException
Parameters:
rowIndex -
Returns:
the pojo object at the given index.
Throws:
OutOfBoundsException - - The contract defined in IGridModel.getValueAt(int, int) must be respected.

rowIndexOf

int rowIndexOf(C pojo)
Parameters:
pojo -
Returns:
the row index of the given pojo.

getCurrentPojo

C getCurrentPojo()
Returns:
the current pojo, null if none.

getPojoType

java.lang.Class<C> getPojoType()

getValue

java.lang.Object getValue(C pojo,
                          int columnIndex)
Parameters:
pojo - - the pojo to extract value from.
columnIndex - - the columnIndex which must be mapped to a pojo property or to a computed value.
Returns:
the pojo property value for the given column.

getDataView

java.util.List<C> getDataView()
Returns:
A read-only snapshot list reflecting any sort order or filter applied, it is unmodifiable but can change if "back-end" collection or data changes.
In case of paging, it contains only pojos already fetched, and its size must be equal to IGridModel.getCurrentRowCount().

getDataVersion

int getDataVersion()
Returns:
The value must change any time one or more CRUD operations have been completed on the content model and after the model has been synchronized (see IGridModel.sync().
This can be used by wrapping models to update their state when the wrapped model changes.

getPropertyName

java.lang.String getPropertyName(int columnIndex)
Parameters:
columnIndex -
Returns:
null if the column is not related to a pojo property, otherwise the property name which can be different from the column name.