|
|||||||||
| 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
The rows in an iterator object will be processed in a forward direction; first-to-last. |
static int |
FETCH_REVERSE
The rows in an iterator object will be processed in a reverse direction; last-to-first. |
static int |
FETCH_UNKNOWN
The order in which rows in an iterator object will be processed is unknown. |
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. |
boolean |
endFetch()
Returns true iff the iterator is not positioned on a row. |
int |
getFetchSize()
Retrieves 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 |
getSensitivity()
Returns the sensitivity of this iterator object. |
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this iterator is returned. |
boolean |
isClosed()
check if the iterator has been closed or not. |
boolean |
next()
Advances the iterator to the next row. |
void |
setFetchSize(int rows)
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 INSENSITIVE
public static final int SENSITIVE
public static final int ASENSITIVE
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: If it is not already closed, an iterator is automatically closed when it is garbage collected.
isClosed()
public boolean isClosed()
throws java.sql.SQLException
close method on this iterator has
been called, false otherwise.close()
public boolean next()
throws java.sql.SQLException
Note: A FETCH..INTO statement performs an implicit
next call on the iterator passed.
public boolean endFetch()
throws java.sql.SQLException
next method is called (which is called
implicitely during the execution of a FETCH..INTO statement).
Note: If next has not yet been called, this method
returns true;
A common usage of this method is as follows:
while (true) {
#sql { FETCH :c INTO ... };
if (c.endFetch()) break;
...
}
next()
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.
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 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.
public void clearWarnings()
throws java.sql.SQLException
public int getFetchSize()
throws java.sql.SQLException
public void setFetchSize(int rows)
throws java.sql.SQLException
rows - the default fetch size for result sets generated from
this iterator object.
public int getSensitivity()
throws java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||