com.inmethod.grid
Interface IDataSource.IQuery

Enclosing interface:
IDataSource<T>

public static interface IDataSource.IQuery

Specifies the subset of data to be loaded.

Author:
Matej Knopp

Field Summary
static int UNKNOWN_TOTAL_COUNT
          Constant that represents unknown row count returned by getTotalCount()
 
Method Summary
 int getCount()
          Returns the amount of items to be loaded.
 int getFrom()
          Returns the index of first item to be loaded
 IGridSortState getSortState()
          Returns the IGridSortState that can be used to determine which sortable columns have been used to sort the table.
 int getTotalCount()
          Returns the total amount of rows or UNKNOWN_TOTAL_COUNT if the amount of rows is not known yet.
 

Field Detail

UNKNOWN_TOTAL_COUNT

static final int UNKNOWN_TOTAL_COUNT
Constant that represents unknown row count returned by getTotalCount()

See Also:
Constant Field Values
Method Detail

getFrom

int getFrom()
Returns the index of first item to be loaded

Returns:
index of first item to be loaded

getCount

int getCount()
Returns the amount of items to be loaded. If the total amount is known (it was either set by IDataSource.IQueryResult.setTotalCount(int) before calling this method or the previous call to IDataSource.query(IDataSource.IQuery, IDataSource.IQueryResult) set IDataSource.IQueryResult.NO_MORE_ITEMS as 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

int getTotalCount()
Returns the total amount of rows or UNKNOWN_TOTAL_COUNT if the amount of rows is not known yet.

Returns:
total amount of rows

getSortState

IGridSortState getSortState()
Returns the IGridSortState that can be used to determine which sortable columns have been used to sort the table.

Returns:
sort state


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