Class KeysetScrollDelegate

java.lang.Object
org.springframework.data.jpa.repository.query.KeysetScrollDelegate

public class KeysetScrollDelegate extends Object
Delegate for keyset scrolling.
Since:
3.1
Author:
Mark Paluch
  • Constructor Details

    • KeysetScrollDelegate

      public KeysetScrollDelegate()
  • Method Details

    • of

      public static KeysetScrollDelegate of(ScrollPosition.Direction direction)
      Factory method to obtain the right KeysetScrollDelegate.
      Parameters:
      direction - the direction of scrolling.
      Returns:
      a KeysetScrollDelegate matching the requested direction.
    • getProjectionInputProperties

      public static Collection<String> getProjectionInputProperties(JpaEntityInformation<?,?> entity, Collection<String> projectionProperties, Sort sort)
      Return a collection of property names required to construct a keyset selection query that include all keyset and identifier properties required to resume keyset scrolling.
      Parameters:
      entity - the underlying entity.
      projectionProperties - projection property names.
      sort - sort properties.
      Returns:
      a collection of property names required to construct a keyset selection query
    • createPredicate

      @Nullable public <E, P> P createPredicate(KeysetScrollPosition keyset, Sort sort, KeysetScrollDelegate.QueryStrategy<E,P> strategy)
    • getSortOrders

      protected Sort getSortOrders(Sort sort)
    • postProcessResults

      protected <T> List<T> postProcessResults(List<T> result)
    • getResultWindow

      protected <T> List<T> getResultWindow(List<T> list, int limit)