Doc from jakarta.
Doc from jakarta.page request for which this
page was obtained
Doc from jakarta.
Page.
This may be used to simplify implementation of a repository interface.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final boolean | moreResults
Record Component accessed by moreResults(). whether there is a (nonempty) next page of results |
| private final PageRequest | pageRequest
Record Component accessed by pageRequest(). Thepage request for which this
page was obtained
|
| private final long | totalElements
Record Component accessed by totalElements(). The total number of elements across all pages that can be requested for the query. |
| Access | Constructor and Description |
|---|---|
| public | PageRecord(PageRequest
The pageRequest, List<T> page request for which
this page was obtained.The page content. content, long 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. totalElements)Constructs a new instance, computing the |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public List | content()
Record Component getter of content. Implements jakarta. Returns the page content as a Record Component The page content |
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public boolean | hasContent()
Implements jakarta. Returns whether the |
| public final int | |
| public boolean | hasNext()
Implements jakarta. Returns |
| public boolean | hasPrevious()
Implements jakarta. Returns |
| public boolean | hasTotals()
Implements jakarta. Returns |
| public Iterator | |
| public boolean | moreResults()
Record Component getter of moreResults.
Record Component whether there is a (nonempty) next page of results |
| public PageRequest | nextPageRequest()
Implements jakarta. Returns a request for the next page if |
| public int | numberOfElements()
Implements jakarta. Returns the number of elements on this |
| public PageRequest | pageRequest()
Record Component getter of pageRequest. Implements jakarta. Returns the page request for which this page was obtained.
Record Component
The |
| public PageRequest | previousPageRequest()
Implements jakarta. Returns a request for the previous page, if |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| public long | totalElements()
Record Component getter of totalElements. Implements jakarta. Returns the total number of elements across all pages of query results, if the
Record Component The total number of elements across all pages that can be requested for the query. |
| public long | totalPages()
Implements jakarta. Returns the total number of pages of query results, if the |
| content | back to summary |
|---|---|
| private final List<T> content Record Component accessed by content(). The page content | |
| moreResults | back to summary |
|---|---|
| private final boolean moreResults Record Component accessed by moreResults(). whether there is a (nonempty) next page of results | |
| pageRequest | back to summary |
|---|---|
| private final PageRequest pageRequest Record Component accessed by pageRequest(). The | |
| totalElements | back to summary |
|---|---|
| private final long totalElements Record Component accessed by 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 | back to summary |
|---|---|
| public PageRecord(PageRequest pageRequest, List<T> content, long totalElements) Constructs a new instance, computing the
| |
| PageRecord | back to summary |
|---|---|
| public PageRecord(PageRequest pageRequest, List<T> content, long totalElements, boolean moreResults) | |
| content | back to summary |
|---|---|
| public List Record Component getter of content. Implements jakarta. Doc from jakarta. Returns the page content as a | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hasContent | back to summary |
|---|---|
| public boolean hasContent() Implements jakarta. Doc from jakarta. Returns whether the | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements jakarta. Doc from jakarta. Returns
| |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements jakarta. Doc from jakarta. Returns
| |
| hasTotals | back to summary |
|---|---|
| public boolean hasTotals() Implements jakarta. Doc from jakarta. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| moreResults | back to summary |
|---|---|
| public boolean moreResults() Record Component getter of moreResults.
| |
| nextPageRequest | back to summary |
|---|---|
| public PageRequest nextPageRequest() Implements jakarta. Doc from jakarta. Returns a request for the next page if
| |
| numberOfElements | back to summary |
|---|---|
| public int numberOfElements() Implements jakarta. Doc from jakarta. Returns the number of elements on this
| |
| pageRequest | back to summary |
|---|---|
| public PageRequest pageRequest() Record Component getter of pageRequest. Implements jakarta. Doc from jakarta. Returns the page request for which this page was obtained.
| |
| previousPageRequest | back to summary |
|---|---|
| public PageRequest previousPageRequest() Implements jakarta. Doc from jakarta. Returns a request for the previous page, if
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |
| totalElements | back to summary |
|---|---|
| public long totalElements() Record Component getter of totalElements. Implements jakarta. Doc from jakarta. Returns the total number of elements across all pages of query results, if the
| |
| totalPages | back to summary |
|---|---|
| public long totalPages() Implements jakarta. Doc from jakarta. Returns the total number of pages of query results, if the
| |