Uses of Interface
jakarta.data.page.PageRequest
Package
Description
Splits query results into pages.
A repository is an interface annotated with
Repository
that defines
operations on entities.-
Uses of PageRequest in jakarta.data.page
Modifier and TypeMethodDescriptionPageRequest.afterCursor
(PageRequest.Cursor cursor) Requests cursor-based pagination in the forward direction, starting after the specified key.static PageRequest
PageRequest.afterCursor
(PageRequest.Cursor cursor, long pageNumber, int maxPageSize, boolean requestTotal) Requests cursor-based pagination in the forward direction, starting after the specified key.PageRequest.beforeCursor
(PageRequest.Cursor cursor) Requests cursor-based pagination in the previous page direction relative to the specified key values.static PageRequest
PageRequest.beforeCursor
(PageRequest.Cursor cursor, long pageNumber, int maxPageSize, boolean requestTotal) Requests cursor-based pagination in the previous page direction relative to the specified cursor.CursoredPage.nextPageRequest()
Creates a request for the next page in a forward direction from the current page.Page.nextPageRequest()
Returns a request for the next page ifPage.hasNext()
indicates there might be a next page.static PageRequest
PageRequest.ofPage
(long pageNumber) Creates a new page request with the given page number and with a default size of 10.static PageRequest
PageRequest.ofPage
(long pageNumber, int maxPageSize, boolean requestTotal) Creates a new page request without a cursor.static PageRequest
PageRequest.ofSize
(int maxPageSize) Creates a new page request for requesting pages of the specified size, starting with the first page number, which is 1.Page.pageRequest()
Returns the page request for which this page was obtained.CursoredPage.previousPageRequest()
Creates a request for the previous page in a reverse direction from the current page.Page.previousPageRequest()
Returns a request for the previous page, ifPage.hasPrevious()
indicates there might be a previous page.PageRequest.size
(int maxPageSize) Creates a new page request with the same pagination information, but with the specified maximum page size.PageRequest.withoutTotal()
Returns an otherwise-equivalent page request withrequestTotal()
set tofalse
, so that totals will not be retrieved from the database.PageRequest.withTotal()
Returns an otherwise-equivalent page request withrequestTotal()
set tofalse
, so that totals will be retrieved from the database. -
Uses of PageRequest in jakarta.data.page.impl
Modifier and TypeMethodDescriptionCursoredPageRecord.nextPageRequest()
Returns the value of thenextPageRequest
record component.PageRecord.nextPageRequest()
CursoredPageRecord.pageRequest()
Returns the value of thepageRequest
record component.PageRecord.pageRequest()
Returns the value of thepageRequest
record component.CursoredPageRecord.previousPageRequest()
Returns the value of thepreviousPageRequest
record component.PageRecord.previousPageRequest()
ModifierConstructorDescriptionCursoredPageRecord
(List<T> content, List<PageRequest.Cursor> cursors, long totalElements, PageRequest pageRequest, boolean firstPage, boolean lastPage) CursoredPageRecord
(List<T> content, List<PageRequest.Cursor> cursors, long totalElements, PageRequest pageRequest, PageRequest nextPageRequest, PageRequest previousPageRequest) Creates an instance of aCursoredPageRecord
record class.PageRecord
(PageRequest pageRequest, List<T> content, long totalElements) Constructs a new instance, computing thePageRecord.moreResults
component astrue
if the pagecontent
is a full page of results and thetotalElements
is either unavailable (indicated by a negative value) or it exceeds the current page number multiplied by thesize
of a full page.PageRecord
(PageRequest pageRequest, List<T> content, long totalElements, boolean moreResults) Creates an instance of aPageRecord
record class. -
Uses of PageRequest in jakarta.data.repository
Modifier and TypeMethodDescriptionBasicRepository.findAll
(PageRequest pageRequest, Order<T> sortBy) Returns aPage
of entities according to the page request that is provided as thePageRequest
parameter.