public abstract class AbstractQuerySession<RESULTSET,RESULTSETROW> extends Object implements QuerySession<RESULTSET>
Serializable[] instances.| Constructor and Description |
|---|
AbstractQuerySession(long maxResults,
long batchSize,
ServerQuery<RESULTSET> query)
Common constructor that initialises the session's id and batch size
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Retrieves the id this query session can be identified as
|
protected RESULTSETROW[] |
getNextResults(RESULTSETROW[] allResults)
Helper method to page through the results.
|
ServerQuery<RESULTSET> |
getQuery() |
protected RESULTSET |
getQueryResults(ServiceRegistry serviceRegistry)
Helper method to get the results.
|
boolean |
haveMoreResults()
Check if the session is expecting more results.
|
protected abstract RESULTSETROW[] |
makeArray(int size) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextResultspublic AbstractQuerySession(long maxResults,
long batchSize,
ServerQuery<RESULTSET> query)
maxResults - the maximum number of results to retrieve for the query. This is not the page
size, which is normally significantly smaller.batchSize - the batch size this session will usequery - the query that generates the resultspublic String getId()
getId in interface QuerySession<RESULTSET>public ServerQuery<RESULTSET> getQuery()
protected RESULTSET getQueryResults(ServiceRegistry serviceRegistry)
serviceRegistry - thepublic boolean haveMoreResults()
haveMoreResults in interface QuerySession<RESULTSET>protected abstract RESULTSETROW[] makeArray(int size)
protected final RESULTSETROW[] getNextResults(RESULTSETROW[] allResults)
Copyright © 2005–2014 Alfresco Software. All rights reserved.