public abstract class AbstractQuerySession extends java.lang.Object implements QuerySession
Serializable[]
instances.Constructor and Description |
---|
AbstractQuerySession(long maxResults,
long batchSize,
ServerQuery query)
Common constructor that initialises the session's id and batch size
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Retrieves the id this query session can be identified as
|
protected java.lang.Object[] |
getNextResults(java.lang.Object[] allResults)
Helper method to page through the results.
|
ServerQuery |
getQuery() |
protected java.lang.Object |
getQueryResults(org.alfresco.service.ServiceRegistry serviceRegistry)
Helper method to get the results.
|
boolean |
haveMoreResults()
Check if the session is expecting more results.
|
protected abstract java.lang.Object[] |
makeArray(int size) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextResults
public AbstractQuerySession(long maxResults, long batchSize, ServerQuery 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 java.lang.String getId()
getId
in interface QuerySession
public ServerQuery getQuery()
protected java.lang.Object getQueryResults(org.alfresco.service.ServiceRegistry serviceRegistry)
serviceRegistry
- thepublic boolean haveMoreResults()
haveMoreResults
in interface QuerySession
protected abstract java.lang.Object[] makeArray(int size)
protected final java.lang.Object[] getNextResults(java.lang.Object[] allResults)
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.