|
||||||||||
| 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
org.datanucleus.store.query.AbstractQueryResult
org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult
org.datanucleus.store.rdbms.query.ScrollableQueryResult
public final class ScrollableQueryResult
Lazy collection results from a Query with the ResultSet scrollable. Supports the following query extensions (in addition to those supported by superclasses) :-
| Field Summary | |
|---|---|
protected Map<Integer,Object> |
resultIds
|
| Fields inherited from class org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult |
|---|
rof, rs |
| Fields inherited from class org.datanucleus.store.query.AbstractQueryResult |
|---|
closed, connectionListeners, loadResultsAtCommit, LOCALISER, query, resultSizeMethod, size |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ScrollableQueryResult(org.datanucleus.store.query.Query query,
org.datanucleus.store.query.ResultObjectFactory rof,
ResultSet rs,
Collection candidates)
Constructor of the result from a Query. |
|
| Method Summary | |
|---|---|
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)
Equality operator for QueryResults. |
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". |
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. |
| Methods inherited from class org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult |
|---|
closeResults, disconnect, hashCode |
| Methods inherited from class org.datanucleus.store.query.AbstractQueryResult |
|---|
add, add, addAll, addConnectionListener, assertIsOpen, clear, contains, containsAll, indexOf, isEmpty, isOpen, lastIndexOf, remove, set, size, subList |
| Methods inherited from class java.util.AbstractList |
|---|
listIterator, removeRange |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, remove, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
addAll, remove, removeAll, retainAll |
| Methods inherited from interface java.util.List |
|---|
addAll, remove, removeAll, retainAll |
| Field Detail |
|---|
protected Map<Integer,Object> resultIds
| Constructor Detail |
|---|
public ScrollableQueryResult(org.datanucleus.store.query.Query query,
org.datanucleus.store.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 = false| Method Detail |
|---|
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 position
public void close()
close in interface org.datanucleus.store.query.QueryResultclose in class AbstractRDBMSQueryResultprotected void closingConnection()
closingConnection in class org.datanucleus.store.query.AbstractQueryResultprotected void cacheQueryResults()
public Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in class org.datanucleus.store.query.AbstractQueryResultpublic ListIterator listIterator()
listIterator in interface ListlistIterator in class org.datanucleus.store.query.AbstractQueryResultpublic boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in class org.datanucleus.store.query.AbstractQueryResulto - The object to compare against
public Object get(int index)
get in interface Listget in class org.datanucleus.store.query.AbstractQueryResultindex - The index of the element
protected int getSizeUsingMethod()
getSizeUsingMethod in class org.datanucleus.store.query.AbstractQueryResultpublic Object[] toArray()
toArray in interface CollectiontoArray in interface ListtoArray in class org.datanucleus.store.query.AbstractQueryResultpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListtoArray in class org.datanucleus.store.query.AbstractQueryResult
protected Object writeReplace()
throws ObjectStreamException
ObjectStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||