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
static int MORE_ITEMS
          Constant indicating that there are more items left.
static int NO_MORE_ITEMS
          Constant indicating that there are no more items left.
 
Method Summary
 void setItems(Iterator<? extends T> items)
          Sets the actual loaded items.
 void setTotalCount(int count)
          Sets the total items count.
 

Field Detail

MORE_ITEMS

static final int MORE_ITEMS
Constant indicating that there are more items left.

See Also:
Constant Field Values

NO_MORE_ITEMS

static final int NO_MORE_ITEMS
Constant indicating that there are no more items left.

See Also:
Constant Field Values
Method Detail

setTotalCount

void setTotalCount(int count)
Sets the total items count. Alternatively, if the total item count can't be determined, either MORE_ITEMS or NO_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 of IDataSource.IQuery.getCount(), so it is preferred to call this method before calling setItems(Iterator).

Parameters:
count - the total count of items

setItems

void setItems(Iterator<? extends T> items)
Sets the actual loaded items.

Parameters:
items - iterator able to iterate through the loaded items.


Copyright © 2007-2012 inMethod s.r.o.. All Rights Reserved.