Package com.inmethod.grid
Interface IDataSource.IQueryResult<T>
- Type Parameters:
T
- row/item model object type
- Enclosing interface:
- IDataSource<T>
public static interface IDataSource.IQueryResult<T>
Used to pass the total row count and the loaded item to the caller of
IDataSource.query(IDataSource.IQuery, IDataSource.IQueryResult)
method.- Author:
- Matej Knopp
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant indicating that there are more items left.static final int
Constant indicating that there are no more items left. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the actual loaded items.void
setTotalCount
(long count) Sets the total items count.
-
Field Details
-
MORE_ITEMS
static final int MORE_ITEMSConstant indicating that there are more items left.- See Also:
-
NO_MORE_ITEMS
static final int NO_MORE_ITEMSConstant indicating that there are no more items left.- See Also:
-
-
Method Details
-
setTotalCount
void setTotalCount(long count) Sets the total items count. Alternatively, if the total item count can't be determined, eitherMORE_ITEMS
orNO_MORE_ITEMS
constant can be used to indicate whether there are more items left or not. If the real items count is specified, it might affect the result ofIDataSource.IQuery.getCount()
, so it is preferred to call this method before callingsetItems(Iterator)
.- Parameters:
count
- the total count of items
-
setItems
Sets the actual loaded items.- Parameters:
items
- iterator able to iterate through the loaded items.
-