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 aKeysetScrollPositionbased on the same keyset and scrolling backward.booleanforward()Returns aKeysetScrollPositionbased on the same keyset and scrolling forward.getKeys()inthashCode()booleanReturns whether the current scroll position is the initial one.reverse()Returns a newKeysetScrollPositionwith the direction reversed.booleanReturns whether the currentKeysetScrollPositionscrolls backward.booleanReturns whether the currentKeysetScrollPositionscrolls forward.toString()
-
Method Details
-
getKeys
- Returns:
- the keyset.
-
getDirection
- Returns:
- the scroll direction.
-
scrollsForward
public boolean scrollsForward()Returns whether the currentKeysetScrollPositionscrolls forward.- Returns:
- whether the current
KeysetScrollPositionscrolls forward.
-
scrollsBackward
public boolean scrollsBackward()Returns whether the currentKeysetScrollPositionscrolls backward.- Returns:
- whether the current
KeysetScrollPositionscrolls backward.
-
forward
Returns aKeysetScrollPositionbased on the same keyset and scrolling forward.- Returns:
- will never be null.
-
backward
Returns aKeysetScrollPositionbased on the same keyset and scrolling backward.- Returns:
- will never be null.
-
reverse
Returns a newKeysetScrollPositionwith the direction reversed.- Returns:
- will never be null.
-
isInitial
public boolean isInitial()Description copied from interface:ScrollPositionReturns whether the current scroll position is the initial one.- Specified by:
isInitialin interfaceScrollPosition- Returns:
-
equals
-
hashCode
public int hashCode() -
toString
-