Package org.springframework.data.domain
Class KeysetScrollPosition
java.lang.Object
org.springframework.data.domain.KeysetScrollPosition
- All Implemented Interfaces:
ScrollPosition
A
ScrollPosition
based on the last seen keyset. Keyset scrolling must be associated with a well-defined sort
to be able to extract the keyset when resuming scrolling within the sorted result set.- Since:
- 3.1
- Author:
- Mark Paluch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Keyset scrolling direction. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getKeys()
int
hashCode()
static KeysetScrollPosition
initial()
Creates a new initialKeysetScrollPosition
to start scrolling using keyset-queries.boolean
Returns whether the current scroll position is the initial one.static KeysetScrollPosition
Creates a newKeysetScrollPosition
from a keyset.static KeysetScrollPosition
of
(Map<String, ?> keys, KeysetScrollPosition.Direction direction) Creates a newKeysetScrollPosition
from a keyset andKeysetScrollPosition.Direction
.toString()
-
Method Details
-
initial
Creates a new initialKeysetScrollPosition
to start scrolling using keyset-queries.- Returns:
- a new initial
KeysetScrollPosition
to start scrolling using keyset-queries.
-
of
Creates a newKeysetScrollPosition
from a keyset.- Parameters:
keys
- must not be null.- Returns:
- a new
KeysetScrollPosition
for the given keyset.
-
of
Creates a newKeysetScrollPosition
from a keyset andKeysetScrollPosition.Direction
.- Parameters:
keys
- must not be null.direction
- must not be null.- Returns:
- a new
KeysetScrollPosition
for the given keyset andKeysetScrollPosition.Direction
.
-
isInitial
public boolean isInitial()Description copied from interface:ScrollPosition
Returns whether the current scroll position is the initial one.- Specified by:
isInitial
in interfaceScrollPosition
- Returns:
-
getKeys
- Returns:
- the keyset.
-
getDirection
- Returns:
- the scroll direction.
-
equals
-
hashCode
public int hashCode() -
toString
-