|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<ResultItem>
com.centrasite.query.LazyQueryResult<ResultItem>
ResultItem
- the type of a result itempublic class LazyQueryResult<ResultItem>
Fire an XQuery and lazily process the result. Allow separate queries to be used for getting the count and repositioning within the result. Cache the result in vector. Note this should go along with cursor processing - otherwise the full query result would be returned in a single server request.
Field Summary | |
---|---|
protected java.lang.String |
m_query
|
static java.lang.String |
rcs_id
|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
LazyQueryResult(javax.xml.xquery.XQConnection xqConnection,
LazyQueryResultParser<ResultItem> resultParser,
java.lang.String query,
java.lang.String countQuery,
java.lang.String positionQueryPart1,
java.lang.String positionQueryPart2)
Construct a LazyQueryResult from a query. |
|
LazyQueryResult(javax.xml.xquery.XQConnection xqConnection,
LazyQueryResultParser<ResultItem> resultParser,
java.lang.String query,
java.lang.String countQuery,
java.lang.String positionQueryPart1,
java.lang.String positionQueryPart2,
javax.xml.xquery.XQResultSequence resultSequence)
Alternate constructor for use with a prepared query. |
Method Summary | |
---|---|
void |
close()
Close a LazyQueryResponse, releasing any resources. |
protected void |
finalize()
See Object.finalize() |
protected int |
getRepositioningLimit()
Return repositioning limit, i.e. the minimum distance (counted in number of result items) from the current position, that will cause a repositioning query to be issued. |
java.util.ListIterator<ResultItem> |
listIterator(int index)
See List.listIterator(int) |
int |
size()
Retrieve the size of the query result. |
Methods inherited from class java.util.AbstractSequentialList |
---|
add, addAll, get, iterator, remove, set |
Methods inherited from class java.util.AbstractList |
---|
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Field Detail |
---|
public static final java.lang.String rcs_id
protected java.lang.String m_query
Constructor Detail |
---|
public LazyQueryResult(javax.xml.xquery.XQConnection xqConnection, LazyQueryResultParser<ResultItem> resultParser, java.lang.String query, java.lang.String countQuery, java.lang.String positionQueryPart1, java.lang.String positionQueryPart2) throws javax.xml.xquery.XQException
xqConnection
- an XQJ connection (cursoring should be enabled!)resultParser
- the result item parserquery
- the plain querycountQuery
- the count querypositionQueryPart1
- the first part of the position querypositionQueryPart2
- the second part of the position query
javax.xml.xquery.XQException
public LazyQueryResult(javax.xml.xquery.XQConnection xqConnection, LazyQueryResultParser<ResultItem> resultParser, java.lang.String query, java.lang.String countQuery, java.lang.String positionQueryPart1, java.lang.String positionQueryPart2, javax.xml.xquery.XQResultSequence resultSequence) throws javax.xml.xquery.XQException
xqConnection
- an XQJ connection (cursoring should be enabled!)resultParser
- the result item parserquery
- the plain querycountQuery
- the count querypositionQueryPart1
- the first part of the position querypositionQueryPart2
- the second part of the position queryresultSequence
- a result sequence to be used for the initial chunk
javax.xml.xquery.XQException
Method Detail |
---|
public void close()
public int size()
size
in interface java.util.Collection<ResultItem>
size
in interface java.util.List<ResultItem>
size
in class java.util.AbstractCollection<ResultItem>
public java.util.ListIterator<ResultItem> listIterator(int index)
List.listIterator(int)
listIterator
in interface java.util.List<ResultItem>
listIterator
in class java.util.AbstractSequentialList<ResultItem>
protected int getRepositioningLimit()
protected void finalize() throws java.lang.Throwable
Object.finalize()
finalize
in class java.lang.Object
java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |