Class ScrollDelegate

java.lang.Object
org.springframework.data.jdbc.repository.support.ScrollDelegate

public class ScrollDelegate extends Object
Delegate to run scroll queries and create result Window.
Since:
3.1.4
Author:
Mark Paluch
  • Constructor Details

    • ScrollDelegate

      public ScrollDelegate()
  • Method Details

    • scroll

      public static <T> Window<T> scroll(Query query, Function<Query,List<T>> queryFunction, ScrollPosition scrollPosition)
      Run the Query and return a scroll Window.
      Parameters:
      query - must not be null.
      scrollPosition - must not be null.
      Returns:
      the scroll Window.
    • getFirst

      public static <T> List<T> getFirst(int count, List<T> list)
      Return the first count items 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 list is greater count.