All Packages    This Package  Previous  Next  

Interface sqlj.runtime.ResultSetIterator

public interface ResultSetIterator
An interface that defines the shared functionality of those objects used to iterate over the contents of a result set.


Variable Index

 o ASENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an asensitive cursor.
 o INSENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an insensitive cursor.
 o SENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have a sensitive cursor.

Method Index

 o clearWarnings()
After this call getWarnings returns null until a new warning is reported for this iterator.
 o close()
Closes the iterator object, releasing any underlying resources.
 o getResultSet()
Returns the JDBC result set associated with this iterator.
 o getWarnings()
The first warning reported by calls on this iterator is returned.
 o isClosed()
 o next()
Advances the iterator to the next row.

Variables

 o ASENSITIVE
 public static final int ASENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an asensitive cursor.

 o INSENSITIVE
 public static final int INSENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an insensitive cursor.

 o SENSITIVE
 public static final int SENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have a sensitive cursor.

Methods

 o close
 public abstract void close() throws SQLException
Closes the iterator object, releasing any underlying resources. It is recommended that iterators be explicitely closed as soon as they are no longer needed to allow for the immediate release of resources that are no longer needed.

Note: If it is not already closed, an iterator is automatically closed when it is garbage collected.

Throws: SQLException
If there is a problem closing the iterator.
See Also:
isClosed
 o isClosed
 public abstract boolean isClosed() throws SQLException
Returns:
true if the close method on this iterator has been called, false otherwise.
Throws: SQLException
if an error occurs determining the close-status of the iterator.
See Also:
close
 o next
 public abstract boolean next() throws SQLException
Advances the iterator to the next row. At the begining the iterator is positioned before the first row.

Note: A FETCH..INTO statement performs an implicit next call on the iterator passed.

Returns:
true if there was a next row in the iterator, false otherwise.
Throws: SQLException
If an exception occurs while changing the position of the iterator.
 o getResultSet
 public abstract ResultSet getResultSet() throws SQLException
Returns the JDBC result set associated with this iterator. The result set produced must have normal JDBC functionality, as defined in the JDBC specification (in particular, SQL NULL values fetched with primitive accessor methods will not raise a SQLNullException). This method is provided to facilitate interoperablity with JDBC.

Notes:

Returns:
a JDBC result set for this iterator.
Throws: SQLException
if no result set is available for this iterator.
 o getWarnings
 public abstract SQLWarning getWarnings() throws SQLException
The first warning reported by calls on this iterator is returned. Subsequent iterator warings will be chained to this SQLWarning.

The warning chain is automatically cleared each time a new role is read.

Note: This warning cheain only covers warnings caused by iterator methods. Any warning caused by statement execution (such as fetching OUT parameters) will be chained on the ExecutionContext object.

Returns:
the first SQLWarning or null it there are no errors
Throws: SQLException
if a database-access error occurs.
 o clearWarnings
 public abstract void clearWarnings() throws SQLException
After this call getWarnings returns null until a new warning is reported for this iterator.

Throws: SQLException
if a database-access error occurs.

All Packages    This Package  Previous  Next