SQL/MX Programming Manual for Java

SQLJ Syntax
HP NonStop SQL/MX Programming Manual for Java523726-003
A-2
Iterator Declaration Clause
Iterator Declaration Clause
An iterator declaration clause generates an iterator class. An iterator is an object that
contains the result of the execution of a query. An iterator is either positioned or
named. An iterator class declaration can appear anywhere a Java class definition can
appear. All iterator classes implement interface ResultSetIterator.
Java-modifiers
specify the usual modifiers for Java class declarations: private, protected,
public, final, static, transient, volatile.
Java-class-name
is a valid Java identifier that names the iterator context class.
implements-clause
specifies a list of user-defined interfaces or the SQLJ interface
sqlj.runtime.ForUpdate. You must specify the SQLJ interface ForUpdate
when you declare an iterator for a positioned UPDATE or positioned DELETE
iterator-declaration-clause is:
[
Java-modifiers] iterator Java-class-name
[implements-clause] [with-clause]
({
positioned-iterator | named-iterator})
implements-clause is:
implements
interface-element [{,interface-element}...]
interface-element is:
sqlj.runtime.ForUpdate
with-clause is:
with (
with-element [{,with-element}...])
with-element is:
with-keyword = with-value
with-keyword is:
sensitivity
| holdability
| returnability
| updateColumns
with-value is:
Java-constant-expression
positioned-iterator is:
Java-data-type [,Java-data-type]...
named-iterator is:
Java-data-type Java-ID [,Java-data-type Java-ID]...