Module spring.data.jdbc
Class ScrollDelegate
java.lang.Object
org.springframework.data.jdbc.repository.support.ScrollDelegate
Delegate to run
scroll queries and create result Window.- Since:
- 3.1.4
- Author:
- Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>Return the firstcountitems from the list.static <T> Window<T>scroll(org.springframework.data.relational.core.query.Query query, Function<org.springframework.data.relational.core.query.Query, List<T>> queryFunction, ScrollPosition scrollPosition) Run theQueryand return a scrollWindow.
-
Constructor Details
-
ScrollDelegate
public ScrollDelegate()
-
-
Method Details
-
scroll
public static <T> Window<T> scroll(org.springframework.data.relational.core.query.Query query, Function<org.springframework.data.relational.core.query.Query, List<T>> queryFunction, ScrollPosition scrollPosition) Run theQueryand return a scrollWindow.- Parameters:
query- must not be null.scrollPosition- must not be null.- Returns:
- the scroll
Window.
-
getFirst
Return the firstcountitems from the list.- Type Parameters:
T- the element type of the lists.- Parameters:
count- the number of first elements to be included in the returned list.list- must not be null- Returns:
- the returned sublist if the
listis greatercount.
-