Interface Pagination<T>

  • Type Parameters:
    T - type of record, usually an Entity
    All Superinterfaces:
    AutoCloseable, Closeable, Iterable<T>

    public interface Pagination<T>
    extends Iterable<T>, Closeable
    Represents a page, i.e. a subset, of records

    The Pagination object will be associated with a database connection. You must iterate through all results to close the connection.

    • Method Detail

      • getCurrentOffset

        Long getCurrentOffset()
        Returns:
        offset from which these records are returned
      • getNextOffset

        Long getNextOffset()
        Returns:
        offset to use to retrieve the next set of records, null if this is the last page of records
      • getMaxNbRecords

        Long getMaxNbRecords()
        Total number of records in the complete data set, regardless of paging and filtering

        The implementation doesn't have to guarantee accuracy.

        Returns:
        total number of records (approximation), null if unknown
      • getTotalNbRecords

        Long getTotalNbRecords()
        Total number of records in the data set, regardless of paging, but including filtering

        The implementation doesn't have to guarantee accuracy.

        Returns:
        total number of records (approximation), null if unknown