|
||||||||||
| 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.jpox.store.query.AbstractQueryResult
org.jpox.store.rdbms.query.AbstractRDBMSQueryResult
org.jpox.store.rdbms.query.ForwardQueryResult
public final class ForwardQueryResult
Lazy collection results from a Query with the ResultSet in a forwards direction. In general the actual result elements are only loaded when accessed with the exception of non-transactional or optimistic contexts that load the elements at initialisation.
| Field Summary | |
|---|---|
protected boolean |
moreResultSetRows
Whether there are still more rows to be processed in the ResultSet. |
protected java.util.List |
resultObjs
The Result Objects. |
| Fields inherited from class org.jpox.store.rdbms.query.AbstractRDBMSQueryResult |
|---|
qs, rof, rs |
| Fields inherited from class org.jpox.store.query.AbstractQueryResult |
|---|
closed, connectionListeners, LOCALISER, query |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ForwardQueryResult(org.jpox.store.mapped.expression.QueryExpression qs,
org.jpox.store.query.Query query,
org.jpox.store.query.ResultObjectFactory rof,
java.sql.ResultSet rs,
java.util.Collection candidates)
Constructor of the result from a Query. |
|
| Method Summary | |
|---|---|
void |
close()
Method to close the results, making the results unusable thereafter. |
protected void |
closingConnection()
Method called to inform the query result that the connection is being closed so perform any required operations now, or rest in peace. |
boolean |
contains(java.lang.Object o)
Method to check if the specified object is contained in this result. |
boolean |
containsAll(java.util.Collection c)
Method to check if all of the specified objects are contained here. |
boolean |
equals(java.lang.Object o)
Equality operator for QueryResults. |
java.lang.Object |
get(int index)
Method to retrieve a particular element from the list. |
boolean |
isEmpty()
Returns true if this collection contains no elements. |
java.util.Iterator |
iterator()
Accessor for an iterator for the results. |
java.util.ListIterator |
listIterator()
Accessor for an iterator for the results. |
protected java.lang.Object |
nextResultSetElement()
Accessor for the next object from the ResultSet. |
int |
size()
Method to return the size of the result. |
java.lang.Object[] |
toArray()
Method to return the results as an array. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Method to return the results as an array. |
| Methods inherited from class org.jpox.store.rdbms.query.AbstractRDBMSQueryResult |
|---|
closeResults, disconnect, hashCode |
| Methods inherited from class org.jpox.store.query.AbstractQueryResult |
|---|
add, add, addAll, addConnectionListener, assertIsOpen, clear, indexOf, isOpen, lastIndexOf, remove, set, 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 org.jpox.store.query.QueryResult |
|---|
disconnect |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, clear, hashCode, remove, removeAll, retainAll |
| Methods inherited from interface java.util.List |
|---|
addAll, remove, removeAll, retainAll |
| Field Detail |
|---|
protected boolean moreResultSetRows
protected java.util.List resultObjs
| Constructor Detail |
|---|
public ForwardQueryResult(org.jpox.store.mapped.expression.QueryExpression qs,
org.jpox.store.query.Query query,
org.jpox.store.query.ResultObjectFactory rof,
java.sql.ResultSet rs,
java.util.Collection candidates)
throws java.sql.SQLException
qs - The Query Statementquery - The Queryrof - The factory to retrieve results fromrs - The ResultSet from the Query Statementcandidates - Candidate elements. Pass this argument only when distinct = false
java.sql.SQLException - if cant read ResultSet| Method Detail |
|---|
protected java.lang.Object nextResultSetElement()
public void close()
close in interface org.jpox.store.query.QueryResultclose in class AbstractRDBMSQueryResultprotected void closingConnection()
closingConnection in class org.jpox.store.query.AbstractQueryResultpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listiterator in class org.jpox.store.query.AbstractQueryResultpublic java.util.ListIterator listIterator()
listIterator in interface java.util.ListlistIterator in class org.jpox.store.query.AbstractQueryResultpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listcontains in class org.jpox.store.query.AbstractQueryResulto - The object
public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.ListcontainsAll in class org.jpox.store.query.AbstractQueryResultc - The collection of objects
public boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in class org.jpox.store.query.AbstractQueryResulto - The object to compare against
public java.lang.Object get(int index)
get in interface java.util.Listget in class org.jpox.store.query.AbstractQueryResultindex - The index of the element
public boolean isEmpty()
This implementation check if the result is empty.
isEmpty in interface java.util.CollectionisEmpty in interface java.util.ListisEmpty in class org.jpox.store.query.AbstractQueryResultpublic int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class org.jpox.store.query.AbstractQueryResultpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class org.jpox.store.query.AbstractQueryResultpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class org.jpox.store.query.AbstractQueryResulta - The array to copy into.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||