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
-
Method Details
-
hasNext
boolean hasNext()Returnstrue
if there may be another page.- Returns:
false
if there are no more pages
-
getNext
Get the next page in the sequence.- Returns:
- java.util.List of the rows from the next page
-
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
-