public final class ScrollableQueryResult extends AbstractRDBMSQueryResult implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,Object> |
resultIds |
bulkLoadedValueByMemberNumber, closeStatementWithResultSet, rof, rs
closed, connectionListeners, loadResultsAtCommit, query, resultSizeMethod, size
modCount
Constructor and Description |
---|
ScrollableQueryResult(org.datanucleus.store.query.Query query,
ResultObjectFactory rof,
ResultSet rs,
Collection candidates)
Constructor of the result from a Query.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cacheQueryResults() |
void |
close()
Method to close the results, making the results unusable thereafter.
|
protected void |
closingConnection()
Inform the query result that the connection is being closed so perform
any operations now, or rest in peace.
|
boolean |
equals(Object o) |
Object |
get(int index)
Method to retrieve a particular element from the list.
|
protected Object |
getObjectForIndex(int index)
Accessor for the result object at an index.
|
protected int |
getSizeUsingMethod()
Method to get the size using the "resultSizeMethod".
|
int |
hashCode() |
void |
initialise() |
Iterator |
iterator()
Accessor for an iterator for the results.
|
ListIterator |
listIterator()
Accessor for an iterator for the results.
|
protected void |
loadObjects(int start,
int maxNumber)
Convenience method to load up rows starting at the specified position.
|
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
protected Object |
writeReplace()
Handle serialisation by returning a java.util.ArrayList of all of the results for this query
after disconnecting the query which has the consequence of enforcing the load of all objects.
|
closeResults, disconnect, registerMemberBulkResultSet, setCloseStatementWithResultSet
add, add, addAll, addConnectionListener, assertIsOpen, clear, contains, containsAll, indexOf, isEmpty, isOpen, lastIndexOf, remove, set, size, subList
listIterator, removeRange
addAll, remove, removeAll, retainAll, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream
addAll, remove, removeAll, replaceAll, retainAll, sort, spliterator
public ScrollableQueryResult(org.datanucleus.store.query.Query query, ResultObjectFactory rof, ResultSet rs, Collection candidates)
query
- The Queryrof
- The factory to retrieve results fromrs
- The ResultSet from the Query Statementcandidates
- the Candidates collection. Pass this argument only when distinct = falsepublic void initialise()
initialise
in class AbstractRDBMSQueryResult
protected void loadObjects(int start, int maxNumber)
start
- Start rowmaxNumber
- Max number to process (-1 means no maximum)protected Object getObjectForIndex(int index)
index
- The list index positionpublic void close()
close
in interface org.datanucleus.store.query.QueryResult
close
in class AbstractRDBMSQueryResult
protected void closingConnection()
closingConnection
in class org.datanucleus.store.query.AbstractQueryResult
protected void cacheQueryResults()
public Iterator iterator()
public ListIterator listIterator()
listIterator
in interface List
listIterator
in class org.datanucleus.store.query.AbstractQueryResult
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in class AbstractRDBMSQueryResult
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class AbstractRDBMSQueryResult
public Object get(int index)
protected int getSizeUsingMethod()
getSizeUsingMethod
in class org.datanucleus.store.query.AbstractQueryResult
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
toArray
in class org.datanucleus.store.query.AbstractQueryResult
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
toArray
in class org.datanucleus.store.query.AbstractQueryResult
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
- thrown if an error occursCopyright © 2015. All rights reserved.