Interface PaginationTypePicker<T>

  • Type Parameters:
    T - the type of the paginated object.
    All Superinterfaces:
    SlicePaginationPicker<T>
    All Known Subinterfaces:
    RepositoryOptionsPicker<A,​I>

    public interface PaginationTypePicker<T>
    extends SlicePaginationPicker<T>
    An element of the Paginator DSL allowing to choose the pagination type. Three pagination types are supported:
    • Offset-based which allows to skip a specified amount of objects,
    • Page-based which is similar to offset-based but allows to specify the amount of skipped objects as a number of pages,
    • Key-based which allows to select objects that come after a specific value of a specific attribute.
    • Method Detail

      • byPage

        SizePicker<T> byPage​(long pageIndex)
        Choose a page-based pagination type. Objects that come before the beginning of specified page will be skipped.
        Parameters:
        pageIndex - the index of the page containing objects that will be returned.
        Returns:
        the next operation of the paginator DSL, allowing to specify page size.