public interface PagingCalculator
| Modifier and Type | Interface and Description |
|---|---|
static interface |
PagingCalculator.Sizeable
Interface for objects that have a size.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PAGE_SIZE |
| Modifier and Type | Method and Description |
|---|---|
long |
getCurrentPage()
Returns the number of the currently loaded page of data (zero
based).
|
int |
getCurrentPageSize()
Returns the number of elements of the current page.
|
long |
getInitialIndex()
Returns the index of the initial element of the current page into all the
elements.
|
int |
getMaxPageSize()
Returns the current maximum number of values per page.
|
long |
getNumPages()
Returns the number of pages available, calculated with the total number
of elements and the maximum number of elements per page.
|
long |
getTotalSize()
Returns the number of elements of the entire set of data.
|
void |
setCurrentPage(long page)
Sets the current page number (zero based), and loads the elements for
that page.
|
void |
setMaxPageSize(int pageSize)
Sets the current maximum number of elements per page.
|
static final int DEFAULT_PAGE_SIZE
int getMaxPageSize()
void setMaxPageSize(int pageSize)
throws BaseException
pageSize - the maximum number of values per pageBaseException - if there is an error reloading the current pagelong getCurrentPage()
void setCurrentPage(long page)
throws BaseException
page - the page to loadBaseException - if there is an error setting the current pagelong getInitialIndex()
long getNumPages()
long getTotalSize()
int getCurrentPageSize()