Package com.onwbp.adaptation
Class RequestPagination
- java.lang.Object
- com.onwbp.adaptation.RequestPagination
 
 - public final class RequestPagination extends Object Performs paged navigation upon a request.- Since:
- 5.8.0
- See Also:
- Request.paginate()
 
-   Nested Class SummaryNested Classes Modifier and Type Class Description static classRequestPagination.PageRepresents a page over a request.
 -   Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestPagination.PagegetFirstPage()Returns the first page of the current request.RequestPagination.PagegetLastPage()Returns the last page of the current request.RequestPagination.PagegetNextPage (Adaptation rowJustBeforePage)Returns the page which contains the records just after the specified row.RequestPagination.PagegetNextPage (PrimaryKey rowJustBeforePage)Returns the page which contains the records just after the specified row.RequestPagination.PagegetNextPage (RequestPagination.Page aPage)Returns the page which contains the records just after the specified page.intgetPageSize()Returns the maximum size of pages to be returned.RequestPagination.PagegetPreviousPage (Adaptation rowJustAfterPage)Returns the page which contains the records just before the specified row.RequestPagination.PagegetPreviousPage (PrimaryKey rowJustAfterPage)Returns the page which contains the records just before the specified row.RequestPagination.PagegetPreviousPage (RequestPagination.Page aPage)Returns the page which contains the records just before the specified row.voidsetPageSize (int aPageSize)Specifies the size of pages to be returned.
 
-   
-   Method Detail- getPageSize- public int getPageSize() Returns the maximum size of pages to be returned.
 - setPageSize- public void setPageSize(int aPageSize) Specifies the size of pages to be returned. The actual size of a returned page can be less than specified, if the end of the result has been reached.- The default size is 10. - Throws:
- IllegalArgumentException- if the specified size is not greater than 1.
- See Also:
- RequestPagination.Page.getSize()
 
 - getFirstPage- public RequestPagination.Page getFirstPage() Returns the first page of the current request.
 - getNextPage- public RequestPagination.Page getNextPage(RequestPagination.Page aPage) Returns the page which contains the records just after the specified page.- If there is no next page, returns the specified page. 
 - getNextPage- public RequestPagination.Page getNextPage(PrimaryKey rowJustBeforePage) Returns the page which contains the records just after the specified row. Returns- nullif no record exists for the specified row key: the client code should take into account the case where the record has been deleted since the row key was registered.- Throws:
- IllegalArgumentException- if the specified row is- null.
 
 - getNextPage- public RequestPagination.Page getNextPage(Adaptation rowJustBeforePage) Returns the page which contains the records just after the specified row.- Throws:
- IllegalArgumentException- if the specified row is- null, or is not a record.
 
 - getPreviousPage- public RequestPagination.Page getPreviousPage(RequestPagination.Page aPage) Returns the page which contains the records just before the specified row.- If the first page is reached, reinvokes the method - getFirstPage(), so as to return a full page.
 - getPreviousPage- public RequestPagination.Page getPreviousPage(PrimaryKey rowJustAfterPage) Returns the page which contains the records just before the specified row. Returns- nullif no record exists for the specified row key: the client code should take into account the case where the record has been deleted since the row key was registered.- If the first page is reached, reinvokes the method - getFirstPage(), so as to return a full page.- Throws:
- IllegalArgumentException- if the specified row key is- null.
 
 - getPreviousPage- public RequestPagination.Page getPreviousPage(Adaptation rowJustAfterPage) Returns the page which contains the records just before the specified row.- If the first page is reached, reinvokes the method - getFirstPage(), so as to return a full page.- Throws:
- IllegalArgumentException- if the specified row is- null, or is not a record.
 
 - getLastPage- public RequestPagination.Page getLastPage() Returns the last page of the current request.
 
 
-