Class CursorPage<O>
java.lang.Object
java.util.AbstractCollection<O>
java.util.AbstractList<O>
ubic.gemma.persistence.util.CursorPage<O>
- All Implemented Interfaces:
Iterable<O>, Collection<O>, List<O>, SequencedCollection<O>
A page of results returned by keyset (cursor) pagination. Parallels
Slice.
Unlike Slice, a CursorPage carries no offset and the
totalElements count is optional (and null by default — cursor mode
avoids the COUNT(*) cost of computing a total on every request). The page
carries nextCursor / prevCursor tokens (also nullable) for the
client to use as the ?cursor= parameter on the following request.
- Author:
- phase3
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
CursorPage
-
-
Method Details
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<O>- Specified by:
sizein interfaceList<O>- Specified by:
sizein classAbstractCollection<O>
-
getSort
-
getLimit
-
getNextCursor
- Returns:
- base64url-encoded cursor token for the next page, or
nullif this is the last page.
-
getPrevCursor
- Returns:
- base64url-encoded cursor token for the previous page, or
nullif this is the first page (or if backward navigation is not supported by the producing DAO).
-
getTotalElements
- Returns:
- total element count, or
nullwhen not computed. Cursor pagination intentionally omits this by default to avoidCOUNT(*)per request; clients that need it can opt in via the endpoint's?includeTotal=trueparameter when available.
-
map
-