|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ListBuilder<T>
A lazy builder that allows clients to retrieve individual pages of potentially long (and performance-degrading) lists of entities. If a method returns a list builder and you automatically get every possible member of the list, YOU ARE DOING IT WRONG.
Method Summary | |
---|---|
int |
getAvailableSize()
Gets the total number of elements available to return if the whole list were requested |
java.util.List<T> |
getPage(int offset,
int maxResults)
Gets a page of results by providing the offset of the first element in the page, and the page size. |
java.util.List<T> |
getRange(int startIndex,
int endIndex)
Gets a range of results by providing the indexes of the first and last elements you wish to return. |
Method Detail |
---|
java.util.List<T> getRange(int startIndex, int endIndex)
startIndex
- the zero-based index of the first result you wish returnedendIndex
- the zero-based index of the last result you wish returned
java.util.List<T> getPage(int offset, int maxResults)
offset
- the zero-based index of the first result you wish returnedmaxResults
- the size of the page requested
int getAvailableSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |