|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - public interface Pager<T>
Abstract class that represents a single page in a set of objects returned from a query (possibly a subset of the total number of matching objects available). NOTE: Indices for objects and pages are 0-based.
| Method Summary | |
|---|---|
Integer |
getCount()
Get the total number of objects in this result set (not in this page). |
Integer |
getCurrentIndex()
The index of this page. |
Integer |
getFirstRecord()
Returns the index of the first record in this result set |
List<Integer> |
getIndices()
Get a list of page indices for which labels are available. |
Integer |
getLastRecord()
Returns the index of the last record in this result set |
Integer |
getNextIndex()
The index of the next page in this result set, or null if this is the last page in the result set. |
String |
getPageNumber(int index)
Get a string label for a given page (NOTE: Labels may not be calculated for each page in the result set, especially if the result set is large or the operation for calculating the label is expensive. |
Integer |
getPagesAvailable()
The total number of pages available for this query, or 0 if there are no matching objects |
Integer |
getPageSize()
Gets the size of pages in this result set. |
Integer |
getPrevIndex()
The index of the previous page in this result set, or null if this is the first page in the result set. |
List<T> |
getRecords()
Returns the records in this page. |
String |
getSuggestion()
Returns a suggested query string (only applicable for free-text / lucene queries). |
| Method Detail |
|---|
Integer getPagesAvailable()
Integer getNextIndex()
Integer getPrevIndex()
Integer getCurrentIndex()
String getPageNumber(int index)
getIndices().
index -
Integer getPageSize()
List<Integer> getIndices()
Integer getCount()
getPageSize() then getPagesAvailable() > 1
Integer getFirstRecord()
Integer getLastRecord()
List<T> getRecords()
String getSuggestion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||