org.jpox.store.rdbms.query
Class AbstractRDBMSQueryResult

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by org.jpox.store.query.AbstractQueryResult
              extended by org.jpox.store.rdbms.query.AbstractRDBMSQueryResult
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List, org.jpox.store.query.QueryResult
Direct Known Subclasses:
ForwardQueryResult, ScrollableQueryResult

public abstract class AbstractRDBMSQueryResult
extends org.jpox.store.query.AbstractQueryResult
implements org.jpox.store.query.QueryResult, java.io.Serializable

Abstract representation of a QueryResult for RDBMS queries.

See Also:
Serialized Form

Field Summary
protected  org.jpox.store.mapped.expression.QueryExpression qs
          The Query statement used to generate these results.
protected  org.jpox.store.query.ResultObjectFactory rof
          Result Object Factory used for accessing the elements.
protected  java.sql.ResultSet rs
          The ResultSet containing the results.
 
Fields inherited from class org.jpox.store.query.AbstractQueryResult
closed, connectionListeners, LOCALISER, query
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AbstractRDBMSQueryResult(org.jpox.store.mapped.expression.QueryExpression qs, org.jpox.store.query.Query query, org.jpox.store.query.ResultObjectFactory rof, java.sql.ResultSet rs)
          Constructor of the result from a Query.
 
Method Summary
 void close()
          Method to close the results, meaning that they are inaccessible after this point.
protected  void closeResults()
          Internal method to close the ResultSet.
 void disconnect()
          Method to disconnect the results from the ObjectManager, meaning that thereafter it just behaves like a List.
 int hashCode()
          Accessor for the hashcode of this object
 
Methods inherited from class org.jpox.store.query.AbstractQueryResult
add, add, addAll, addConnectionListener, assertIsOpen, clear, closingConnection, contains, containsAll, equals, get, indexOf, isEmpty, isOpen, iterator, lastIndexOf, listIterator, remove, set, size, subList, toArray, toArray
 
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
add, addAll, clear, contains, containsAll, equals, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
addAll, remove, removeAll, retainAll
 

Field Detail

rof

protected org.jpox.store.query.ResultObjectFactory rof
Result Object Factory used for accessing the elements.


rs

protected java.sql.ResultSet rs
The ResultSet containing the results.


qs

protected org.jpox.store.mapped.expression.QueryExpression qs
The Query statement used to generate these results.

Constructor Detail

AbstractRDBMSQueryResult

public AbstractRDBMSQueryResult(org.jpox.store.mapped.expression.QueryExpression qs,
                                org.jpox.store.query.Query query,
                                org.jpox.store.query.ResultObjectFactory rof,
                                java.sql.ResultSet rs)
Constructor of the result from a Query.

Parameters:
qs - The Query Statement
query - The Query
rof - The factory to retrieve results from
rs - The ResultSet from the Query Statement
Method Detail

disconnect

public void disconnect()
Method to disconnect the results from the ObjectManager, meaning that thereafter it just behaves like a List. All remaining results are read in at this point (unless selected not to be).

Specified by:
disconnect in interface org.jpox.store.query.QueryResult
Overrides:
disconnect in class org.jpox.store.query.AbstractQueryResult

close

public void close()
Method to close the results, meaning that they are inaccessible after this point.

Specified by:
close in interface org.jpox.store.query.QueryResult
Overrides:
close in class org.jpox.store.query.AbstractQueryResult

closeResults

protected void closeResults()
Internal method to close the ResultSet.

Specified by:
closeResults in class org.jpox.store.query.AbstractQueryResult

hashCode

public int hashCode()
Accessor for the hashcode of this object

Specified by:
hashCode in interface java.util.Collection
Specified by:
hashCode in interface java.util.List
Overrides:
hashCode in class org.jpox.store.query.AbstractQueryResult
Returns:
The hash code


Copyright © -2008 . All Rights Reserved.