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 key set. Keyset scrolling must be associated with a well-defined sort
to be able to extract the key set when resuming scrolling within the sorted result set.- Since:
- 3.1
- Author:
- Mark Paluch, Oliver Drotbohm
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.domain.ScrollPosition
ScrollPosition.Direction
-
Method Summary
Modifier and TypeMethodDescriptionbackward()
Returns aKeysetScrollPosition
based on the same keyset and scrolling backward.boolean
forward()
Returns aKeysetScrollPosition
based on the same keyset and scrolling forward.getKeys()
int
hashCode()
boolean
Returns whether the current scroll position is the initial one.reverse()
Returns a newKeysetScrollPosition
with the direction reversed.boolean
Returns whether the currentKeysetScrollPosition
scrolls backward.boolean
Returns whether the currentKeysetScrollPosition
scrolls forward.toString()
-
Method Details
-
getKeys
- Returns:
- the keyset.
-
getDirection
- Returns:
- the scroll direction.
-
scrollsForward
public boolean scrollsForward()Returns whether the currentKeysetScrollPosition
scrolls forward.- Returns:
- whether the current
KeysetScrollPosition
scrolls forward.
-
scrollsBackward
public boolean scrollsBackward()Returns whether the currentKeysetScrollPosition
scrolls backward.- Returns:
- whether the current
KeysetScrollPosition
scrolls backward.
-
forward
Returns aKeysetScrollPosition
based on the same keyset and scrolling forward.- Returns:
- will never be null.
-
backward
Returns aKeysetScrollPosition
based on the same keyset and scrolling backward.- Returns:
- will never be null.
-
reverse
Returns a newKeysetScrollPosition
with the direction reversed.- Returns:
- will never be null.
-
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:
-
equals
-
hashCode
public int hashCode() -
toString
-