Package org.exolab.castor.jdo.engine
Class OQLQueryImpl.OQLEnumeration
java.lang.Object
org.exolab.castor.jdo.engine.OQLQueryImpl.OQLEnumeration
- All Implemented Interfaces:
Enumeration<Object>
,QueryResults
- Enclosing class:
- OQLQueryImpl
Enumeration
implementation to traverse the result as returned by the
execution of the OQL query.-
Constructor Summary
ConstructorsConstructorDescriptionOQLEnumeration
(QueryResults results) OQLEnumeration
(QueryResults results, Vector<String> pathInfo, ClassDescriptor clsDesc) Creates an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int row) moves the result of the query to the absolute position in the resultset.void
close()
Closes the result set and releases all resources held by it.boolean
hasMore()
Returns true if there are any more results in the result set.boolean
hasMore
(boolean skipError) boolean
next()
Returns the next result in the result set.int
size()
Finds the size of the resulting resultset from the query.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
OQLEnumeration
OQLEnumeration(QueryResults results, Vector<String> pathInfo, ClassDescriptor clsDesc) Creates an instance of this class.- Parameters:
results
-pathInfo
-clsDesc
-
-
OQLEnumeration
OQLEnumeration(QueryResults results)
-
-
Method Details
-
absolute
Description copied from interface:QueryResults
moves the result of the query to the 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
Description copied from interface:QueryResults
Finds the size of the resulting resultset from the query.- 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 interfaceEnumeration<Object>
-
hasMore
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
-
hasMore
- Throws:
PersistenceException
-
nextElement
- Specified by:
nextElement
in interfaceEnumeration<Object>
- Throws:
NoSuchElementException
-
next
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 engineNoSuchElementException
- 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
-