Package org.exolab.castor.jdo.engine
Class SimpleQueryExecutor.SimpleQueryResults
- java.lang.Object
-
- org.exolab.castor.jdo.engine.SimpleQueryExecutor.SimpleQueryResults
-
- All Implemented Interfaces:
java.util.Enumeration<java.lang.Object>
,QueryResults
- Enclosing class:
- SimpleQueryExecutor
public class SimpleQueryExecutor.SimpleQueryResults extends java.lang.Object implements QueryResults
-
-
Constructor Summary
Constructors Constructor Description SimpleQueryResults()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
absolute(int row)
use the jdbc 2.0 method to move to an absolute position in the resultset.void
close()
Closes the result set and releases all resources held by it.protected void
finalize()
boolean
hasMore()
Returns true if there are any more results in the result set.boolean
hasMoreElements()
java.lang.Object
next()
Returns the next result in the result set.java.lang.Object
nextElement()
int
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.
-
-
-
Method Detail
-
absolute
public boolean absolute(int row) throws PersistenceException
use the jdbc 2.0 method to move to an absolute position in the resultset.- Specified by:
absolute
in interfaceQueryResults
- Parameters:
row
- The row to move to- Returns:
- ???
- Throws:
PersistenceException
- A persistence error occured
-
size
public int size() throws PersistenceException
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:
size
in interfaceQueryResults
- Returns:
- Size of the resulting result set.
- Throws:
PersistenceException
- A persistence error occured
-
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interfacejava.util.Enumeration<java.lang.Object>
-
hasMore
public boolean hasMore() throws PersistenceException
Description copied from interface:QueryResults
Returns 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:
hasMore
in interfaceQueryResults
- Returns:
- True if there are any more results in the result set
- Throws:
PersistenceException
- An error with the persistence engine
-
nextElement
public java.lang.Object nextElement() throws java.util.NoSuchElementException
- Specified by:
nextElement
in interfacejava.util.Enumeration<java.lang.Object>
- Throws:
java.util.NoSuchElementException
-
next
public java.lang.Object next() throws PersistenceException, java.util.NoSuchElementException
Description copied from interface:QueryResults
Returns 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:
next
in interfaceQueryResults
- Returns:
- The next result in the result set
- Throws:
PersistenceException
- An error with the persistence enginejava.util.NoSuchElementException
- There are no more results in the result set
-
close
public void close()
Description copied from interface:QueryResults
Closes the result set and releases all resources held by it.- Specified by:
close
in interfaceQueryResults
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-