public class ResultSetImpl extends ArrayList<ResultItem> implements ResultSet
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
detachResultsFlag |
protected int |
offset |
protected int |
pageHits |
protected String |
query |
protected int |
range
0 means all results
|
protected CoreSession |
session |
protected SQLQuery |
sqlQuery |
protected int |
totalHits |
modCountALWAYS_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, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamprotected final int offset
protected final int range
protected final int totalHits
protected final int pageHits
protected final CoreSession session
protected Boolean detachResultsFlag
public ResultSetImpl(String query, CoreSession session, int offset, int range, List<ResultItem> resultItems, int totalHits, int pageHits)
public boolean detachResults()
public int getOffset()
ResultSetpublic int getRange()
ResultSetpublic ResultSet nextPage() throws SearchException
ResultSetnextPage in interface ResultSetSearchExceptionpublic ResultSet goToPage(int page) throws SearchException
ResultSetgoToPage in interface ResultSetpage - the page to go toSearchExceptionpublic int getTotalHits()
ResultSetgetTotalHits in interface ResultSetpublic int getPageHits()
ResultSetThis is in contrast to getRange() that returns the maximum number of results per page.
getPageHits in interface ResultSetpublic boolean hasNextPage()
ResultSethasNextPage in interface ResultSetpublic boolean isFirstPage()
ResultSetisFirstPage in interface ResultSetpublic ResultSet replay() throws SearchException
ResultSetreplay in interface ResultSetSearchExceptionpublic ResultSet replay(int offset, int range) throws SearchException
ResultSetreplay in interface ResultSetoffset - the new offsetrange - the new rangeSearchExceptionpublic int getPageNumber()
ResultSetgetPageNumber in interface ResultSetCopyright © 2017 Nuxeo. All rights reserved.