|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PagingCalculator
Calculates all the values needed to perform pagination over a set of data.
Nested Class Summary | |
---|---|
static interface |
PagingCalculator.Sizeable
Interface for objects that have a size. |
Field Summary | |
---|---|
static int |
DEFAULT_PAGE_SIZE
|
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final int DEFAULT_PAGE_SIZE
Method Detail |
---|
int getMaxPageSize()
void setMaxPageSize(int pageSize) throws BaseException
pageSize
- the maximum number of values per page
BaseException
- if there is an error reloading the current pagelong getCurrentPage()
void setCurrentPage(long page) throws BaseException
page
- the page to load
BaseException
- if there is an error setting the current pagelong getInitialIndex()
long getNumPages()
long getTotalSize()
int getCurrentPageSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |