Uses of Interface
jakarta.data.page.PageRequest
Package
Description
Jakarta Data provides an API that simplifies data access.
Splits query results into pages.
A repository is an interface annotated with
Repository
that defines
operations on entities.-
Uses of PageRequest in jakarta.data
Modifier and TypeMethodDescriptionOrder.page
(long pageNumber) Create aPageRequest
for the specified page number of page size 10 (the default forPageRequest
) of the query results sorted according to any static sort criteria that is specified and the ordered list ofSort
criteria that is represented by this instance.Order.pageSize
(int size) Create aPageRequest
for the first page of the specified page size of the query results sorted according to any static sort criteria that is specified and the ordered list ofSort
criteria that is represented by this instance. -
Uses of PageRequest in jakarta.data.page
Modifier and TypeMethodDescriptionPageRequest.afterCursor
(PageRequest.Cursor cursor) Requestscursor-based pagination
in the forward direction, starting after the specified key.Requestscursor-based pagination
in the forward direction, starting after the specified key.Creates a new page request with the same pagination information, appending the specifiedascending sort
with lower priority than all other sort criteria (if any) that have already been specified.PageRequest.ascIgnoreCase
(String property) Creates a new page request with the same pagination information, appending the specifiedcase-insensitive ascending sort
with lower priority than all other sort criteria (if any) that have already been specified.PageRequest.beforeCursor
(PageRequest.Cursor cursor) Requestscursor-based pagination
in the previous page direction relative to the specified key values.Requestscursor-based pagination
in the previous page direction relative to the specified key.Creates a new page request with the same pagination information, appending the specifieddescending sort
with lower priority than all other sort criteria (if any) that have already been specified.PageRequest.descIgnoreCase
(String property) Creates a new page request with the same pagination information, appending the specifiedcase-insensitive descending sort
with lower priority than all other sort criteria (if any) that have already been specified.PageRequest.next()
Returns thePageRequest
requesting the next page if using offset pagination.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.<E> PageRequest<E>
Page.nextPageRequest
(Class<E> entityClass) Returns a request for the next page ifPage.hasNext()
indicates there might be a next page.static <T> PageRequest<T>
Creates a page request to use when querying on entities of the specified entity class.static <T> PageRequest<T>
PageRequest.ofPage
(long pageNumber) Creates a new page request with the given page number and with a default size of 10.static <T> PageRequest<T>
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.PageRequest.page
(long pageNumber) Creates a new page request with the same pagination information, but with the specified page number.Page.pageRequest()
Returns the page request for which this page was obtained.<E> PageRequest<E>
Page.pageRequest
(Class<E> entityClass) Returns the page request for which this page was obtained.PageRequest.previous()
Returns thePageRequest
requesting the previous page if using offset pagination, or null if this is the first page, that is, whenpage()
returns1
.CursoredPage.previousPageRequest()
Creates a request for the previous page in a reverse direction from the current page.Page.previousPageRequest()
Returns a request for theprevious
page, ifPage.hasPrevious()
indicates there might be a previous page.<E> PageRequest<E>
Page.previousPageRequest
(Class<E> entityClass) 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.Creates a new page request with the same pagination information, but using the specified sort criteria.Creates a new page request with the same pagination information, but using the specified sort criteria.Creates a new page request with the same pagination information, but using the specified sort criteria.PageRequest.sortBy
(Sort<? super T> sort1, Sort<? super T> sort2, Sort<? super T> sort3, Sort<? super T> sort4) Creates a new page request with the same pagination information, but using the specified sort criteria.PageRequest.sortBy
(Sort<? super T> sort1, Sort<? super T> sort2, Sort<? super T> sort3, Sort<? super T> sort4, Sort<? super T> sort5) Creates a new page request with the same pagination information, but using the specified sort criteria.Creates a new page request with the same pagination information, but using the specified sort criteria.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.<E> PageRequest<E>
CursoredPageRecord.nextPageRequest
(Class<E> entityClass) PageRecord.nextPageRequest()
<E> PageRequest<E>
PageRecord.nextPageRequest
(Class<E> entityClass) CursoredPageRecord.pageRequest()
Returns the value of thepageRequest
record component.<E> PageRequest<E>
CursoredPageRecord.pageRequest
(Class<E> entityClass) PageRecord.pageRequest()
Returns the value of thepageRequest
record component.<E> PageRequest<E>
PageRecord.pageRequest
(Class<E> entityClass) CursoredPageRecord.previousPageRequest()
Returns the value of thepreviousPageRequest
record component.<E> PageRequest<E>
CursoredPageRecord.previousPageRequest
(Class<E> entityClass) PageRecord.previousPageRequest()
<E> PageRequest<E>
PageRecord.previousPageRequest
(Class<E> entityClass) ModifierConstructorDescriptionCursoredPageRecord
(List<T> content, List<PageRequest.Cursor> cursors, long totalElements, PageRequest<T> pageRequest, PageRequest<T> nextPageRequest, PageRequest<T> previousPageRequest) Creates an instance of aCursoredPageRecord
record class.PageRecord
(PageRequest<T> 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<T> 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<T> pageRequest) Returns aPage
of entities according to the page request that is provided as thePageRequest
parameter.