Package org.springframework.data.domain
Interface ScrollPosition
- All Known Implementing Classes:
 KeysetScrollPosition,OffsetScrollPosition
public interface ScrollPosition
Interface to specify a position within a total query result. Scroll positions are used to start scrolling from the
 beginning of a query result or to resume scrolling from a given position within the query result.
- Since:
 - 3.1
 - Author:
 - Mark Paluch
 
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumKeyset scrolling direction. - 
Method Summary
Modifier and TypeMethodDescriptionstatic KeysetScrollPositionCreates a newScrollPositionfrom a key set scrolling backward.static KeysetScrollPositionCreates a newScrollPositionfrom a key set scrolling forward.booleanReturns whether the current scroll position is the initial one.static KeysetScrollPositionkeyset()Creates a new initialScrollPositionto start scrolling using keyset-queries.static KeysetScrollPositionof(Map<String, ?> keys, ScrollPosition.Direction direction) Creates a newScrollPositionfrom a key set andScrollPosition.Direction.static OffsetScrollPositionoffset()Creates a new initialScrollPositionto start scrolling using offset / limit.static OffsetScrollPositionoffset(long offset) Creates a newScrollPositionfrom anoffset. 
- 
Method Details
- 
isInitial
boolean isInitial()Returns whether the current scroll position is the initial one.- Returns:
 
 - 
keyset
Creates a new initialScrollPositionto start scrolling using keyset-queries.- Returns:
 - will never be null.
 
 - 
offset
Creates a new initialScrollPositionto start scrolling using offset / limit.- Returns:
 - will never be null.
 
 - 
offset
Creates a newScrollPositionfrom anoffset.- Parameters:
 offset-- Returns:
 - a new 
OffsetScrollPositionwith the givenoffset. 
 - 
forward
Creates a newScrollPositionfrom a key set scrolling forward.- Parameters:
 keys- must not be null.- Returns:
 - will never be null.
 
 - 
backward
Creates a newScrollPositionfrom a key set scrolling backward.- Parameters:
 keys- must not be null.- Returns:
 - will never be null.
 
 - 
of
Creates a newScrollPositionfrom a key set andScrollPosition.Direction.- Parameters:
 keys- must not be null.direction- must not be null.- Returns:
 - will never be null.
 
 
 -