Class PageRequest
java.lang.Object
com.e1c.langtool.history.db.pagination.PageRequest
- All Implemented Interfaces:
IPageable
The basic implementation of
Pageable.-
Method Summary
Modifier and TypeMethodDescriptionstatic PageRequestfirst(int size) Creates a newPageRequestrequesting the first page.getNext()Returns theIPageablerequesting the next page.intReturns the number of page.intgetSize()Returns the size of page.static PageRequestof(int number, int size) Creates a newPageRequest.
-
Method Details
-
first
- Parameters:
size- the size of page- Returns:
- a new page request
- Throws:
IllegalArgumentException- if the page number < 1 or page size < 0
-
of
Creates a newPageRequest.- Parameters:
number- the one-based number of pagesize- the size of page- Returns:
- a new page request
- Throws:
IllegalArgumentException- if the page number < 1 or page size < 0
-
getNumber
public int getNumber()Description copied from interface:IPageableReturns the number of page. -
getSize
public int getSize()Description copied from interface:IPageableReturns the size of page. -
getNext
Description copied from interface:IPageableReturns theIPageablerequesting the next page. -
getPrevious
Description copied from interface:IPageableReturns theIPageablerequesting the previous or first page if thisIPageablealready is the first one.- Specified by:
getPreviousin interfaceIPageable- Returns:
- the pageable requesting the previous or first page
-