public interface PagedResult<T>
Modifier and Type | Method and Description |
---|---|
Long |
getCount()
The actual number of results returned.
|
Long |
getLimit()
The limit supplied by the client or the server default.
|
Long |
getOffset()
The offset supplied by the client or the server default.
|
default Long |
getPageIndex()
Calculates the page number of the result, the pages are indexed staring 0, which means that
getPageIndex()
returns a value in [0,n) , given 'n' is the total number of pages |
List<T> |
getResults()
List of results.
|
Long |
getTotal()
The total number of results matching the request.
|
default Long |
getTotalPages()
Calculates the total number of pages matching the request.
|
default Optional<T> |
head()
Tries to access the first element of the result list.
|
default boolean |
isFirst()
Checks if this is the first page of a result.
|
default boolean |
isLast()
Checks if it is the last possible page.
|
Long |
size()
Deprecated.
use
getCount() instead |
Long getOffset()
Long getLimit()
@Deprecated Long size()
getCount()
insteadLong getCount()
Long getTotal()
List<T> getResults()
getCount()
is not equal
to getTotal()
the container contains only a subset of all
elements that match the request.getCount()
elements matching the requestdefault Optional<T> head()
default Long getPageIndex()
getPageIndex()
returns a value in [0,n) , given 'n' is the total number of pagesdefault Long getTotalPages()
default boolean isFirst()
default boolean isLast()