PageInfo

Inheritance: java.lang.Object

public class PageInfo

Contains information about retrieved page when paging methods are used.

Constructors

Constructor 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

Methods

Method Description
getPageOffset() Gets offset of a page
setPageOffset(int value) Gets offset of a page
getAbsoluteOffset() Gets additinal offset added to start index of a page
setAbsoluteOffset(int value) Gets additinal offset added to start index of a page
getLastPage() Indicates whether current page is last page in view.
setLastPage(boolean value) Indicates whether current page is last page in view.
getTotalCount() Gets total count of items in view
setTotalCount(int value) Gets total count of items in view
getItemsPerPage() A number of items in page
setItemsPerPage(int value) A number of items in page
getNextPage() Information of the next page or null if current page is last

PageInfo(int itemsPerPage)

public PageInfo(int itemsPerPage)

Initializes a new instance of the PageInfo class

Parameters:

Parameter Type Description
itemsPerPage int A number of items in page

PageInfo(int itemsPerPage, int offset)

public PageInfo(int itemsPerPage, int offset)

Initializes a new instance of the PageInfo class

Parameters:

Parameter Type Description
itemsPerPage int A number of items in page
offset int offset in view of a page

PageInfo(int totalCount, int itemsPerPage, int offset, boolean lastPage)

public PageInfo(int totalCount, int itemsPerPage, int offset, boolean lastPage)

Initializes a new instance of the PageInfo class

Parameters:

Parameter Type Description
totalCount int total count of items in view
itemsPerPage int A number of items in page
offset int offset in view of a page
lastPage boolean Indicates whether current page is last page in view

PageInfo(int totalCount, int itemsPerPage, int offset, int absoluteOffset, boolean lastPage)

public PageInfo(int totalCount, int itemsPerPage, int offset, int absoluteOffset, boolean lastPage)

Initializes a new instance of the PageInfo class

Parameters:

Parameter Type Description
totalCount int total count of items in view
itemsPerPage int
offset int offset in view of a page
absoluteOffset int
lastPage boolean

getPageOffset()

public final int getPageOffset()

Gets offset of a page

Returns: int

setPageOffset(int value)

public final void setPageOffset(int value)

Gets offset of a page

Parameters:

Parameter Type Description
value int

getAbsoluteOffset()

public final int getAbsoluteOffset()

Gets additinal offset added to start index of a page

Returns: int

setAbsoluteOffset(int value)

public final void setAbsoluteOffset(int value)

Gets additinal offset added to start index of a page

Parameters:

Parameter Type Description
value int

getLastPage()

public final boolean getLastPage()

Indicates whether current page is last page in view.

Returns: boolean

setLastPage(boolean value)

public final void setLastPage(boolean value)

Indicates whether current page is last page in view.

Parameters:

Parameter Type Description
value boolean

getTotalCount()

public final int getTotalCount()

Gets total count of items in view

Returns: int

setTotalCount(int value)

public final void setTotalCount(int value)

Gets total count of items in view

Parameters:

Parameter Type Description
value int

getItemsPerPage()

public final int getItemsPerPage()

A number of items in page

Returns: int

setItemsPerPage(int value)

public final void setItemsPerPage(int value)

A number of items in page

Parameters:

Parameter Type Description
value int

getNextPage()

public PageInfo getNextPage()

Information of the next page or null if current page is last

Returns: PageInfo