public class ResultSetImpl extends ArrayList<ResultItem> implements ResultSet
ALWAYS_DETACH_SEARCH_RESULTS_KEY
Constructor and Description |
---|
ResultSetImpl(String query,
CoreSession session,
int offset,
int range,
List<ResultItem> resultItems,
int totalHits,
int pageHits)
Constructor used when a CoreSession is available.
|
Modifier and Type | Method and Description |
---|---|
boolean |
detachResults() |
int |
getOffset()
Returns the current offset for this result set.
|
int |
getPageHits()
Returns the amount of actual matching results.
|
int |
getPageNumber()
Computes the page number among the total set of results.
|
int |
getRange()
Returns the amount of results from offset requested.
|
int |
getTotalHits()
Returns the total number of hits this resultset comes from.
|
ResultSet |
goToPage(int page)
Goes to requested page.
|
boolean |
hasNextPage()
Is there another page available?
|
boolean |
isFirstPage()
Is this result set the first page of results?
|
ResultSet |
nextPage()
Computes the next page by replaying the exact same request.
|
ResultSet |
replay()
Replays the exact same query.
|
ResultSet |
replay(int offset,
int range)
Replays the same query with new offset and range.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
public ResultSetImpl(String query, CoreSession session, int offset, int range, List<ResultItem> resultItems, int totalHits, int pageHits)
public boolean detachResults()
public int getOffset()
ResultSet
public int getRange()
ResultSet
public ResultSet nextPage() throws SearchException
ResultSet
nextPage
in interface ResultSet
SearchException
public ResultSet goToPage(int page) throws SearchException
ResultSet
goToPage
in interface ResultSet
page
- the page to go toSearchException
public int getTotalHits()
ResultSet
getTotalHits
in interface ResultSet
public int getPageHits()
ResultSet
This is in contrast to getRange() that returns the maximum number of results per page.
getPageHits
in interface ResultSet
public boolean hasNextPage()
ResultSet
hasNextPage
in interface ResultSet
public boolean isFirstPage()
ResultSet
isFirstPage
in interface ResultSet
public ResultSet replay() throws SearchException
ResultSet
replay
in interface ResultSet
SearchException
public ResultSet replay(int offset, int range) throws SearchException
ResultSet
replay
in interface ResultSet
offset
- the new offsetrange
- the new rangeSearchException
public int getPageNumber()
ResultSet
getPageNumber
in interface ResultSet
Copyright © 2013 Nuxeo SA. All Rights Reserved.