Package org.exolab.castor.jdo.engine
Class OQLQueryImpl.OQLEnumeration
- java.lang.Object
-
- org.exolab.castor.jdo.engine.OQLQueryImpl.OQLEnumeration
-
- All Implemented Interfaces:
java.util.Enumeration<java.lang.Object>,QueryResults
- Enclosing class:
- OQLQueryImpl
class OQLQueryImpl.OQLEnumeration extends java.lang.Object implements QueryResults, java.util.Enumeration<java.lang.Object>
Enumerationimplementation to traverse the result as returned by the execution of the OQL query.
-
-
Constructor Summary
Constructors Constructor Description OQLEnumeration(QueryResults results)OQLEnumeration(QueryResults results, java.util.Vector<java.lang.String> pathInfo, ClassDescriptor clsDesc)Creates an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabsolute(int row)moves the result of the query to the absolute position in the resultset.voidclose()Closes the result set and releases all resources held by it.booleanhasMore()Returns true if there are any more results in the result set.booleanhasMore(boolean skipError)booleanhasMoreElements()java.lang.Objectnext()Returns the next result in the result set.java.lang.ObjectnextElement()intsize()Finds the size of the resulting resultset from the query.
-
-
-
Constructor Detail
-
OQLEnumeration
OQLEnumeration(QueryResults results, java.util.Vector<java.lang.String> pathInfo, ClassDescriptor clsDesc)
Creates an instance of this class.- Parameters:
results-pathInfo-clsDesc-
-
OQLEnumeration
OQLEnumeration(QueryResults results)
-
-
Method Detail
-
absolute
public boolean absolute(int row) throws PersistenceExceptionDescription copied from interface:QueryResultsmoves the result of the query to the absolute position in the resultset.- Specified by:
absolutein interfaceQueryResults- Parameters:
row- The row to move to- Returns:
- ???
- Throws:
PersistenceException- A persistence error occured
-
size
public int size() throws PersistenceExceptionDescription copied from interface:QueryResultsFinds the size of the resulting resultset from the query.- Specified by:
sizein interfaceQueryResults- Returns:
- Size of the resulting result set.
- Throws:
PersistenceException- A persistence error occured
-
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElementsin interfacejava.util.Enumeration<java.lang.Object>
-
hasMore
public boolean hasMore() throws PersistenceExceptionDescription 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
-
hasMore
public boolean hasMore(boolean skipError) throws PersistenceException- Throws:
PersistenceException
-
nextElement
public java.lang.Object nextElement() throws java.util.NoSuchElementException- Specified by:
nextElementin interfacejava.util.Enumeration<java.lang.Object>- Throws:
java.util.NoSuchElementException
-
next
public java.lang.Object next() throws PersistenceException, java.util.NoSuchElementExceptionDescription 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 enginejava.util.NoSuchElementException- 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
-
-