org.exolab.castor.jdo

Interface QueryResults

public interface QueryResults extends Enumeration

An iteration of the results of a query. This interface provides the ability to move forward only in the result set and pick the next result and close it.

Version: $Revision: 1.3 $ $Date: 2004/05/03 22:05:30 $

Author: Assaf Arkin

Method Summary
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.
Objectnext()
Returns the next result in the result set.
intsize()
finds the size of the resulting resultset from the query.

Method Detail

absolute

public boolean absolute(int row)
moves the result of the query to the absolute position in the resultset

Parameters: row The row to move to

Returns: ???

Throws: PersistenceException A persistence error occured

close

public void close()
Closes the result set and releases all resources held by it.

hasMore

public boolean hasMore()
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.

Returns: True if there are any more results in the result set

Throws: PersistenceException An error with the persistence engine

next

public Object next()
Returns the next result in the result set. If there are no more results (a previous cal to QueryResults 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.

Returns: The next result in the result set

Throws: PersistenceException An error with the persistence engine NoSuchElementException There are no more results in the result set

size

public int size()
finds the size of the resulting resultset from the query.

Returns: Size of the resulting result set.

Throws: PersistenceException A persistence error occured

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com