Sqlj.runtime.forupdate Interface; Sqlj.runtime.namediterator Interface - IBM DB2 Manual

Table of Contents

Advertisement

sqlj.runtime.ForUpdate interface

SQLJ implements the sqlj.runtime.ForUpdate interface in SQLJ programs that
contain an iterator declaration clause with implements sqlj.runtime.ForUpdate.
An SQLJ program that does positioned UPDATE or DELETE operations
(UPDATE...WHERE CURRENT OF or DELETE...WHERE CURRENT OF) must
include an iterator declaration clause with implements sqlj.runtime.ForUpdate.
Methods
getCursorName

sqlj.runtime.NamedIterator interface

The sqlj.runtime.NamedIterator interface is implemented when an SQLJ
application executes an iterator declaration clause for a named iterator.
A named iterator includes result table column names, and the order of the columns
in the iterator is not important.
An implementation of the sqlj.runtime.NamedIterator interface includes an
accessor method for each column in the result table. An accessor method returns
the data from its column of the result table. The name of an accessor method
matches the name of the corresponding column in the named iterator.
Methods (inherited from the ResultSetIterator interface)
close
isClosed
next
298
Application Programming Guide and Reference for Java
Format:
public abstract String getCursorName() throws SQLException
This method is used by code that is generated by the SQLJ translator. It is not
intended for direct use by application programs.
Related tasks
"Performing positioned UPDATE and DELETE operations in an SQLJ
application" on page 114
Format:
public abstract void close() throws SQLException
Releases database resources that the iterator uses.
Format:
public abstract boolean isClosed() throws SQLException
Returns a value of true if the close method has been invoked. Returns false if
the close method has not been invoked.
Format:
public abstract boolean next() throws SQLException
Advances the iterator to the next row. Before an instance of the next method is
invoked for the first time, the iterator is positioned before the first row of the
result table. next returns a value of true when a next row is available and
false when all rows have been retrieved.
Related tasks

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents