Package org.exolab.castor.jdo.engine
Class SimpleQueryExecutor.SimpleQueryResults
java.lang.Object
org.exolab.castor.jdo.engine.SimpleQueryExecutor.SimpleQueryResults
- All Implemented Interfaces:
Enumeration<Object>,QueryResults
- Enclosing class:
SimpleQueryExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabsolute(int row) use the jdbc 2.0 method to move to an absolute position in the resultset.voidclose()Closes the result set and releases all resources held by it.protected voidfinalize()booleanhasMore()Returns true if there are any more results in the result set.booleannext()Returns the next result in the result set.intsize()Uses the underlying db's cursors to most to the last row in the result set, get the row number via getRow(), then move back to where ever the user was positioned in the resultset.Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
SimpleQueryResults
public SimpleQueryResults()
-
-
Method Details
-
absolute
use the jdbc 2.0 method to move to an absolute position in the resultset.- Specified by:
absolutein interfaceQueryResults- Parameters:
row- The row to move to- Returns:
- ???
- Throws:
PersistenceException- A persistence error occured
-
size
Uses the underlying db's cursors to most to the last row in the result set, get the row number via getRow(), then move back to where ever the user was positioned in the resultset.- Specified by:
sizein interfaceQueryResults- Returns:
- Size of the resulting result set.
- Throws:
PersistenceException- A persistence error occured
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElementsin interfaceEnumeration<Object>
-
hasMore
Description copied from interface:QueryResultsReturns true if there are any more results in the result set. If an error occured reading the last result, an exception will be thrown and the result set cannot be used further.- Specified by:
hasMorein interfaceQueryResults- Returns:
- True if there are any more results in the result set
- Throws:
PersistenceException- An error with the persistence engine
-
nextElement
- Specified by:
nextElementin interfaceEnumeration<Object>- Throws:
NoSuchElementException
-
next
Description copied from interface:QueryResultsReturns the next result in the result set. If there are no more results (a previous cal toQueryResults.hasMore()returns false) this method will throw an exceptin. If an error occured reading the last result, an exception will be thrown and the result set cannot be used further.- Specified by:
nextin interfaceQueryResults- Returns:
- The next result in the result set
- Throws:
PersistenceException- An error with the persistence engineNoSuchElementException- There are no more results in the result set
-
close
public void close()Description copied from interface:QueryResultsCloses the result set and releases all resources held by it.- Specified by:
closein interfaceQueryResults
-
finalize
-