Package com.inmethod.grid
Interface IDataSource.IQuery
-
- All Known Subinterfaces:
DataGrid.IGridQuery
- Enclosing interface:
- IDataSource<T>
public static interface IDataSource.IQuerySpecifies the subset of data to be loaded.- Author:
- Matej Knopp
-
-
Field Summary
Fields Modifier and Type Field Description static longUNKNOWN_TOTAL_COUNTConstant that represents unknown row count returned bygetTotalCount()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCount()Returns the amount of items to be loaded.longgetFrom()Returns the index of first item to be loaded<S> IGridSortState<S>getSortState()Returns theIGridSortStatethat can be used to determine which sortable columns have been used to sort the table.longgetTotalCount()Returns the total amount of rows orUNKNOWN_TOTAL_COUNTif the amount of rows is not known yet.
-
-
-
Field Detail
-
UNKNOWN_TOTAL_COUNT
static final long UNKNOWN_TOTAL_COUNT
Constant that represents unknown row count returned bygetTotalCount()- See Also:
- Constant Field Values
-
-
Method Detail
-
getFrom
long getFrom()
Returns the index of first item to be loaded- Returns:
- index of first item to be loaded
-
getCount
long getCount()
Returns the amount of items to be loaded. If the total amount is known (it was either set byIDataSource.IQueryResult.setTotalCount(long)before calling this method or the previous call toIDataSource.query(IDataSource.IQuery, IDataSource.IQueryResult)setIDataSource.IQueryResult.NO_MORE_ITEMSas total count), this method will return the exact amount of required rows. If the total amount of rows is not known, it will always return the number of items per page.- Returns:
- amount of required rows (might be items per page if the total amount of rows is not known)
-
getTotalCount
long getTotalCount()
Returns the total amount of rows orUNKNOWN_TOTAL_COUNTif the amount of rows is not known yet.- Returns:
- total amount of rows
-
getSortState
<S> IGridSortState<S> getSortState()
Returns theIGridSortStatethat can be used to determine which sortable columns have been used to sort the table.- Returns:
- sort state
-
-