public class PageInfo extends Object
Contains information about retrieved page when paging methods are used.
Constructor and Description |
---|
PageInfo(int itemsPerPage)
Initializes a new instance of the
PageInfo class |
PageInfo(int itemsPerPage,
int offset)
Initializes a new instance of the
PageInfo class |
PageInfo(int totalCount,
int itemsPerPage,
int offset,
boolean lastPage)
Initializes a new instance of the
PageInfo class |
PageInfo(int totalCount,
int itemsPerPage,
int offset,
int absoluteOffset,
boolean lastPage)
Initializes a new instance of the
PageInfo class |
Modifier and Type | Method and Description |
---|---|
int |
getAbsoluteOffset()
Gets additinal offset added to start index of a page
|
int |
getItemsPerPage()
A number of items in page
|
boolean |
getLastPage()
Indicates whether current page is last page in view.
|
PageInfo |
getNextPage()
Information of the next page or null if current page is last
|
int |
getPageOffset()
Gets offset of a page
|
int |
getTotalCount()
Gets total count of items in view
|
void |
setAbsoluteOffset(int value)
Gets additinal offset added to start index of a page
|
void |
setItemsPerPage(int value)
A number of items in page
|
void |
setLastPage(boolean value)
Indicates whether current page is last page in view.
|
void |
setPageOffset(int value)
Gets offset of a page
|
void |
setTotalCount(int value)
Gets total count of items in view
|
protected PageInfo next
public PageInfo(int itemsPerPage)
Initializes a new instance of the PageInfo
class
itemsPerPage
- A number of items in pagepublic PageInfo(int itemsPerPage, int offset)
Initializes a new instance of the PageInfo
class
itemsPerPage
- A number of items in pageoffset
- offset in view of a pagepublic PageInfo(int totalCount, int itemsPerPage, int offset, boolean lastPage)
Initializes a new instance of the PageInfo
class
totalCount
- total count of items in viewitemsPerPage
- A number of items in pageoffset
- offset in view of a pagelastPage
- Indicates whether current page is last page in viewpublic PageInfo(int totalCount, int itemsPerPage, int offset, int absoluteOffset, boolean lastPage)
Initializes a new instance of the PageInfo
class
totalCount
- total count of items in viewoffset
- offset in view of a pagepublic final int getPageOffset()
Gets offset of a page
public final void setPageOffset(int value)
Gets offset of a page
public final int getAbsoluteOffset()
Gets additinal offset added to start index of a page
public final void setAbsoluteOffset(int value)
Gets additinal offset added to start index of a page
public final boolean getLastPage()
Indicates whether current page is last page in view.
public final void setLastPage(boolean value)
Indicates whether current page is last page in view.
public final int getTotalCount()
Gets total count of items in view
public final void setTotalCount(int value)
Gets total count of items in view
public final int getItemsPerPage()
A number of items in page
public final void setItemsPerPage(int value)
A number of items in page
public PageInfo getNextPage()
Information of the next page or null if current page is last