Package org.killbill.billing.util.entity
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 recordsThe Pagination object will be associated with a database connection. You must iterate through all results to close the connection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LonggetCurrentOffset()LonggetMaxNbRecords()Total number of records in the complete data set, regardless of paging and filteringLonggetNextOffset()LonggetTotalNbRecords()Total number of records in the data set, regardless of paging, but including filtering-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
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
-
-