|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sqlj.runtime.ref.ResultSetIterImpl | +--sqlj.runtime.ref.ScrollableResultSetIterImpl
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.
ScrollableResultSetIterImpl
,
PositionedIterator
,
NamedIterator
,
ForUpdate
,
Scrollable
Fields inherited from class sqlj.runtime.ref.ResultSetIterImpl |
m_ors,
resultSet |
Constructor Summary |
ScrollableResultSetIterImpl(java.sql.ResultSet ors,
sqlj.runtime.profile.RTResultSet rs)
|
ScrollableResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs)
Creates a new scrollable result set iter impl object that uses data found in the passed result set. |
ScrollableResultSetIterImpl(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 |
---|---|
boolean |
absolute(int row)
Moves the iterator object to the given row number in the result set. |
void |
afterLast()
Moves the iterator object to the end of the result set, just after the last row. |
void |
beforeFirst()
Moves the iterator object to the front of the result set, just before the first row. |
boolean |
first()
Moves the iterator object to the first row in the result set. |
int |
getFetchDirection()
Retrieves the direction for fetching rows from database tables for this iterator object. |
boolean |
isAfterLast()
Indicates whether the iterator object is after the last row in the result set. |
boolean |
isBeforeFirst()
Indicates whether the iterator object is before the first row in the result set. |
boolean |
isFirst()
Indicates whether the iterator object is on the first row of the result set. |
boolean |
isLast()
Indicates whether the iterator object is on the last row of the result set. |
boolean |
last()
Moves the iterator object to the last row in the result set. |
boolean |
previous()
Moves the iterator object to the previous row in the result set. |
boolean |
relative(int rows)
Moves the iterator object a relative number of rows, either positive or negative. |
void |
setFetchDirection(int direction)
Gives the SQLJ runtime a hint as to the direction in which rows of this iterator object are processed. |
Methods inherited from class sqlj.runtime.ref.ResultSetIterImpl |
checkColumns,
clearWarnings,
close,
endFetch,
findColumn,
getCursorName,
getFetchSize,
getResultSet,
getSensitivity,
getWarnings,
isClosed,
next,
setFetchSize |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ScrollableResultSetIterImpl(sqlj.runtime.profile.RTResultSet rs)
public ScrollableResultSetIterImpl(java.sql.ResultSet ors, sqlj.runtime.profile.RTResultSet rs)
public ScrollableResultSetIterImpl(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 setResultSetIterImpl.checkColumns(sqlj.runtime.profile.RTResultSet, int)
Method Detail |
public boolean absolute(int row) throws java.sql.SQLException
If the row number is positive, the iterator object moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.
If the given row number is negative, the iterator object moves to an absolute row position with respect to the end of the result set. For example, calling absolute(-1) positions the iterator object on the last row, absolute(-2) indicates the next-to-last row, and so on.
An attempt to position the iterator object beyond the first/last row in the result set leaves the iterator object before/after the first/last row, respectively.
Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
public void afterLast() throws java.sql.SQLException
public void beforeFirst() throws java.sql.SQLException
public boolean first() throws java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
public boolean isAfterLast() throws java.sql.SQLException
public boolean isBeforeFirst() throws java.sql.SQLException
public boolean isFirst() throws java.sql.SQLException
public boolean isLast() throws java.sql.SQLException
Note: Calling the method isLast may be expensive because the SQLJ driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.
public boolean last() throws java.sql.SQLException
public boolean previous() throws java.sql.SQLException
public boolean relative(int rows) throws java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
direction
- the initial
direction for processing rows.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |