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
Nested ClassesModifier and TypeClassDescriptionstatic enumKeyset scrolling direction. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKeys()inthashCode()static KeysetScrollPositioninitial()Creates a new initialKeysetScrollPositionto start scrolling using keyset-queries.booleanReturns whether the current scroll position is the initial one.static KeysetScrollPositionCreates a newKeysetScrollPositionfrom a keyset.static KeysetScrollPositionof(Map<String, ?> keys, KeysetScrollPosition.Direction direction) Creates a newKeysetScrollPositionfrom a keyset andKeysetScrollPosition.Direction.toString()
-
Method Details
-
initial
Creates a new initialKeysetScrollPositionto start scrolling using keyset-queries.- Returns:
- a new initial
KeysetScrollPositionto start scrolling using keyset-queries.
-
of
Creates a newKeysetScrollPositionfrom a keyset.- Parameters:
keys- must not be null.- Returns:
- a new
KeysetScrollPositionfor the given keyset.
-
of
Creates a newKeysetScrollPositionfrom a keyset andKeysetScrollPosition.Direction.- Parameters:
keys- must not be null.direction- must not be null.- Returns:
- a new
KeysetScrollPositionfor the given keyset andKeysetScrollPosition.Direction.
-
isInitial
public boolean isInitial()Description copied from interface:ScrollPositionReturns whether the current scroll position is the initial one.- Specified by:
isInitialin interfaceScrollPosition- Returns:
-
getKeys
- Returns:
- the keyset.
-
getDirection
- Returns:
- the scroll direction.
-
equals
-
hashCode
public int hashCode() -
toString
-