Interface Pager<I>

Type Parameters:
I - the item type of the page rows

public interface Pager<I>
Interface for pagination of database operations. Use the static methods to instantiate a Pager instance for the required operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get all the avaialble pages and collect them into a single java.util.List.
    Get the next page in the sequence.
    boolean
    Returns true if there may be another page.
  • Method Details

    • hasNext

      boolean hasNext()
      Returns true if there may be another page.
      Returns:
      false if there are no more pages
    • getNext

      List<I> getNext()
      Get the next page in the sequence.
      Returns:
      java.util.List of the rows from the next page
    • getAll

      List<I> getAll()
      Get all the avaialble pages and collect them into a single java.util.List. This operation is not lazy and may consume significant memory to hold the entire results collection for large queries.
      Returns:
      java.util.List of the rows from all the pages