|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
An interface that defines the shared functionality of those objects used to iterate over the contents of a result set.
| Field Summary | |
static int |
ASENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an asensitive cursor. |
static int |
FETCH_FORWARD
Constant to indicate that the rows in an iterator object will be processed in a forward direction first-to-last. |
static int |
FETCH_REVERSE
Constant to indicate that the rows in an iterator object will be processed in a forward direction first-to-last. |
static int |
FETCH_UNKNOWN
Constant to indicate that the rows in an iterator object will be processed in an unknown direction. |
static int |
INSENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have an insensitive cursor. |
static int |
SENSITIVE
Constant used by the "sensitivity" field, indicating that the iterator is defined to have a sensitive cursor. |
| Method Summary | |
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this iterator. |
void |
close()
Closes the iterator object, releasing any underlying resources. |
int |
getFetchSize()
This method is not supported in Open SQL / SQLJ. Retreives the number of rows that is the current fetch size for this iterator object. |
java.sql.ResultSet |
getResultSet()
Returns the JDBC result set associated with this iterator. |
int |
getRow()
Retrieves the current row number. |
int |
getSensitivity()
Retrieves the sensitivity of this iterator object. |
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this iterator is returned. |
boolean |
isClosed()
|
boolean |
next()
Advances the iterator to the next row. |
void |
setFetchSize(int rows)
This method is not supported in Open SQL / SQLJ. Gives the SQLJ runtime a hint as to the number of rows that should be fetched when more rows are needed from this iterator object. |
| Field Detail |
public static final int ASENSITIVE
public static final int INSENSITIVE
public static final int SENSITIVE
public static final int FETCH_FORWARD
public static final int FETCH_REVERSE
public static final int FETCH_UNKNOWN
| Method Detail |
public void close()
throws java.sql.SQLException
Note: An iterator is not automatically closed when it is
garbage collected. Allways close an iterator in the finally
block.
java.sql.SQLException - If there is a problem closing the iterator.isClosed()
public boolean isClosed()
throws java.sql.SQLException
true if the close() method on this
iterator has been called; false otherwise.java.sql.SQLException - if an error occurs determining the
close-status of the iterator.close()
public boolean next()
throws java.sql.SQLException
Note: A FETCH ... INTO statement performs an implicit
next() call on the iterator passed.
true if there was a next row in the iterator;
false otherwise.java.sql.SQLException - If an exception occurs while changing the position of the
iterator.
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
Notes:
next method invocation on the iterator. Once the result
set has been produced, all operations to fetch data should be through the
result set.
java.sql.SQLException - if no result set is available for this iterator.ResultSet
public int getRow()
throws java.sql.SQLException
1,
the second number 2, and so on.0 if there is no current rowjava.sql.SQLException - if there is no JDBC result set
associated with this iterator.
public int getFetchSize()
throws java.sql.SQLException
0, then the value returned is implementation-defined.java.sql.SQLException - if a database error occurs.
public void setFetchSize(int rows)
throws java.sql.SQLException
rows - - the default fetch size for result sets generated from this
iterator object- - if a database access error occurs, or the condition
0 <= rows <= eCtxt.getMaxRows() is not satisfied, where
eCtxt is the ExecutionContext object that was
used to create this iterator object.
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
The warning chain is automatically cleared each time a new role is read.
Note: This warning chain 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.
java.sql.SQLException - if a database-access error occurs.
public void clearWarnings()
throws java.sql.SQLException
java.sql.SQLException - if a database-access error occurs.
public int getSensitivity()
throws java.sql.SQLException
Case:
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||