|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sqlj.runtime.ref.ResultSetIterImpl
The result set iter(ator) impl(ementation) class implements the functionality of both a positioned iterator, and a named iterator. However, it does not directly implement either of these interfaces. Rather, the translator will generate iterator classes which subclass this class and implement only the iterator interface that they were declared to implement (thus avoiding iterators which appear to be both positional and named).
This class is used internally by the reference translator code generation. It is expected that clients will not directly reference this class.
PositionedIterator
,
NamedIterator
,
ForUpdate
Field Summary |
Type | Field |
---|---|
protected oracle.jdbc.driver.OracleResultSet |
m_ors
|
protected sqlj.runtime.profile.RTResultSet |
resultSet
The underlying reference runtime result set |
Constructor Summary |
ResultSetIterImpl(java.sql.ResultSet ors,
sqlj.runtime.profile.RTResultSet rs)
|
ResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs)
Creates a new result set iter impl object that uses data found in the passed result set. |
ResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs,
int numColumns)
Creates a new result set iter impl object that uses data found in the passed result set. |
Method Summary |
Type | Method |
---|---|
static void |
checkColumns(sqlj.runtime.profile.RTResultSet rs,
int expectedColumns)
Verifies that the passed result set has the passed expected number of columns. |
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this iterator. |
void |
close()
closes this iterator and the underlying result set. |
boolean |
endFetch()
Returns false if currently on a row, true otherwise. |
protected int |
findColumn(java.lang.String name)
Returns the index associated with the passed column name on the underlying result set. |
java.lang.String |
getCursorName()
Returns the cursor name of the underlying result set. |
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, if any. |
int |
getSensitivity()
Returns the sensitivity of this iterator object. |
java.sql.SQLWarning |
getWarnings()
Returns the first warning reported by calls on this iterator is returned. |
boolean |
isClosed()
Returns true if this iterator has been closed, false otherwise. |
boolean |
next()
Fetches the next row in the iterator and returns true if there was a row to fetch, false otherwise. |
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. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected oracle.jdbc.driver.OracleResultSet m_ors
protected sqlj.runtime.profile.RTResultSet resultSet
Constructor Detail |
public ResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs)
public ResultSetIterImpl(java.sql.ResultSet ors, sqlj.runtime.profile.RTResultSet rs)
public ResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs, int numColumns) throws java.sql.SQLException
Note: If a SQLException is raised by the constructor, the passed result set is automatically closed.
rs
- the underlying result setnumColumns
- the expected number of columns in the result setcheckColumns(sqlj.runtime.profile.RTResultSet, int)
Method Detail |
public static void checkColumns(sqlj.runtime.profile.RTResultSet rs, int expectedColumns) throws java.sql.SQLException
rs
- the result set to check.expectedColumns
- the expected number of columns in the result set.protected int findColumn(java.lang.String name) throws java.sql.SQLException
Note: We assume that this method is only called during subclass construction, and thus if a SQLException is raised during this method, the underlying result set is automatically closed.
name
- the name of the column in questionpublic java.sql.ResultSet getResultSet() throws java.sql.SQLException
public void close() throws java.sql.SQLException
ResultSetIterator.close()
public boolean isClosed() throws java.sql.SQLException
ResultSetIterator.isClosed()
public java.lang.String getCursorName() throws java.sql.SQLException
ForUpdate.getCursorName()
public boolean endFetch() throws java.sql.SQLException
ResultSetIterator.endFetch()
public boolean next() throws java.sql.SQLException
ResultSetIterator.next()
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
ResultSetIterator.getWarnings()
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 |