Class CollectionGridDataSource
java.lang.Object
org.apache.tapestry5.internal.grid.CollectionGridDataSource
- All Implemented Interfaces:
GridDataSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of rows available in the data source.Returns the type of the first element in the list, or null if the list is empty.getRowValue(int index) Returns the row value at the provided index.booleanisEmpty()Return whether the data source is empty, i.e.voidprepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints) Invoked to allow the source to prepare to present values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tapestry5.grid.GridDataSource
getAvailableRows
-
Constructor Details
-
CollectionGridDataSource
-
-
Method Details
-
isEmpty
Description copied from interface:GridDataSourceReturn whether the data source is empty, i.e. does not have any rows available.- Specified by:
isEmptyin interfaceGridDataSource
-
getAvailableRows
Description copied from interface:GridDataSourceReturns the number of rows available in the data source.- Specified by:
getAvailableRowsin interfaceGridDataSource
-
prepare
Description copied from interface:GridDataSourceInvoked to allow the source to prepare to present values. This gives the source a chance to pre-fetch data (when appropriate) and informs the source of the desired sort order. Sorting comes first, then extraction by range.- Specified by:
preparein interfaceGridDataSource- Parameters:
startIndex- the starting index to be retrievedendIndex- the ending index to be retrievedsortConstraints- identify how data is to be sorted
-
getRowType
Returns the type of the first element in the list, or null if the list is empty.- Specified by:
getRowTypein interfaceGridDataSource- Returns:
- the row type, or null
-
getRowValue
Description copied from interface:GridDataSourceReturns the row value at the provided index. This method will be invoked in sequential order. In rare instances,GridDataSource.getAvailableRows()may return a different number of rows than are actually available (i.e., the database was changed between calls toGridDataSource.getAvailableRows()and the call toGridDataSource.prepare(int, int, java.util.List)). In that case, this method should return null for any out-of-range indexes.- Specified by:
getRowValuein interfaceGridDataSource
-