content
The field for the
content
record component.T
- The type of elements on the pagepageRequest
- The page request
for which this
page was obtainedcontent
- The page contenttotalElements
- The total number of elements across all pages that
can be requested for the query. A negative value
indicates that a total count of elements and pages
is not available.moreResults
- whether there is a (nonempty) next page of resultsPage
.
This may be used to simplify implementation of a repository interface.content
record component.private final boolean
moreResults
record component.private final PageRequest
pageRequest
record component.private final long
totalElements
record component.PageRecord(PageRequest pageRequest,
List<T> content,
long totalElements)
moreResults
component as true
if the page content
is a full
page of results and the totalElements
is either unavailable
(indicated by a negative value) or it exceeds the current
page number multiplied by the
size
of a full page.PageRecord(PageRequest pageRequest,
List<T> content,
long totalElements,
boolean moreResults)
PageRecord
record class.content()
content
record component.final boolean
boolean
Page
has content at all.final int
hashCode()
boolean
hasNext()
true
if it is known that there are more results or that it is
necessary to request a next page to determine whether there are more results,
so that Page.nextPageRequest()
will definitely not return null
.boolean
true
if it is known that there are previous results or that it
is necessary to request the previous page to determine whether there are previous
results, so that Page.previousPageRequest()
will not return null
.boolean
true
if the Page.pageRequest()
specified that the
total number of elements should
be retrieved from the database, and that it is therefore safe to call
Page.totalElements()
or Page.totalPages()
.iterator()
boolean
moreResults
record component.Page.hasNext()
indicates there
might be a next page.int
Page
, which must be no larger
than the maximum size
of the page request.pageRequest
record component.Page.hasPrevious()
indicates there might be a previous page.final String
toString()
long
totalElements
record component.long
Page.pageRequest()
specified that the total should be retrieved
from the database.clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
pageRequest
record component.content
record component.totalElements
record component.moreResults
record component.moreResults
component as true
if the page content
is a full
page of results and the totalElements
is either unavailable
(indicated by a negative value) or it exceeds the current
page number multiplied by the
size
of a full page.pageRequest
- The page request
for which
this page was obtained.content
- The page content.totalElements
- The total number of elements across all pages
that can be requested for the query. A negative
value indicates that a total count of elements
and pages is not available.PageRecord
record class.pageRequest
- the value for the pageRequest
record componentcontent
- the value for the content
record componenttotalElements
- the value for the totalElements
record componentmoreResults
- the value for the moreResults
record componentPage
Page
has content at all.hasContent
in interface Page<T>
Page
has content at all.Page
Page
, which must be no larger
than the maximum size
of the page request.
If the number of elements in the page is smaller than the maximum page size,
then there are no subsequent pages of data to read.numberOfElements
in interface Page<T>
Page
.Page
true
if it is known that there are more results or that it is
necessary to request a next page to determine whether there are more results,
so that Page.nextPageRequest()
will definitely not return null
.Page
Page.hasNext()
indicates there
might be a next page.nextPageRequest
in interface Page<T>
Page
true
if it is known that there are previous results or that it
is necessary to request the previous page to determine whether there are previous
results, so that Page.previousPageRequest()
will not return null
.hasPrevious
in interface Page<T>
false
if this is the first page of results.Page
Returns a request for the previous page, if Page.hasPrevious()
indicates there might be a previous page.
previousPageRequest
in interface Page<T>
Page
true
if the Page.pageRequest()
specified that the
total number of elements should
be retrieved from the database, and that it is therefore safe to call
Page.totalElements()
or Page.totalPages()
.totalElements
record component.totalElements
in interface Page<T>
totalElements
record componentPage
Page.pageRequest()
specified that the total should be retrieved
from the database.totalPages
in interface Page<T>
Objects::equals(Object,Object)
; primitive components are compared with '=='.pageRequest
record component.pageRequest
in interface Page<T>
pageRequest
record componentcontent
record component.moreResults
record component.moreResults
record component