public class RowSetProxy
extends com.streamscape.sef.dispatcher.AbstractRowSetProxy
implements java.io.Closeable
Title: Structured Data Objects
Description: RowSetProxy extends RowSet and fetching rows by bundles, depending on fetchSize.
Copyright: Copyright (c) 2014
Company: StreamScape Technologies
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
RowSetProxy(RowMetaData rowMetaData) |
RowSetProxy(RowSet rowSet) |
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int row)
Moves the cursor to the given row number in this
ResultSet
object. |
void |
afterLast()
Moves the cursor to the end of this
ResultSet object, just
after the last row. |
RowSet |
asRowSet()
Returns serialized RowSet.
|
void |
beforeFirst()
Moves the cursor to the front of this
ResultSet object, just
before the first row. |
void |
close()
No effect on
RowSet . |
boolean |
first()
Moves the cursor to the first row in this
ResultSet object. |
Row |
getCurrentRow()
Returns current row.
|
int |
getFetchSize()
Retrieves the fetch size for this
ResultSet object. |
int |
getPageSize()
Returns the page-size for the
RowSet object
Actually the same as getFetchSize . |
int |
getRow()
Retrieves the current row number.
|
Row |
getRowAt(int index)
Returns row by index.
|
boolean |
isAfterLast()
Retrieves whether the cursor is after the last row in this
ResultSet object. |
boolean |
isBeforeFirst()
Retrieves whether the cursor is before the first row in this
ResultSet object. |
boolean |
isClosed()
Retrieves whether this
ResultSet object has been closed. |
boolean |
isFirst()
Retrieves whether the cursor is on the first row of this
ResultSet object. |
boolean |
isLast()
Retrieves whether the cursor is on the last row of this
ResultSet object. |
boolean |
isScrollable() |
boolean |
last()
Moves the cursor to the last row in this
ResultSet object. |
boolean |
next()
Moves the cursor down one row from its current position.
|
boolean |
nextPage()
Increments the current page of the
RowSet . |
boolean |
previous()
Moves the cursor to the previous row in this
ResultSet
object. |
boolean |
previousPage()
Decrements the current page of the
RowSet . |
boolean |
relative(int rowsCount)
Moves the cursor a relative number of rows, either positive or negative.
|
void |
setFetchSize(int fetchSize)
Gives the JDBC driver a hint as to the number of rows that should
be fetched from the database when more rows are needed for this
ResultSet object. |
void |
setIsScrollable(boolean isScrollable) |
void |
setPageSize(int pageSize)
Sets the
RowSet object's page-size. |
getId, setAccessor, setId
addAll, addRow, addRowSetListener, addToRowSet, addToRowSet, cancelRowUpdates, clearWarnings, clone, convertStringToBytes, createMetaData, deleteFromRowSet, deleteRow, findColumn, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimalColumn, getBigDecimalColumn, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getBooleanColumn, getBooleanColumn, getByte, getByte, getByteColumn, getByteColumn, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getColumnNames, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDateColumn, getDateColumn, getDouble, getDouble, getDoubleColumn, getDoubleColumn, getFetchDirection, getFloat, getFloat, getFloatColumn, getFloatColumn, getHoldability, getInt, getInt, getIntColumn, getIntColumn, getLong, getLong, getLongColumn, getLongColumn, getMeta, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getObjectColumn, getObjectColumn, getOutParameterIndex, getOutParameterName, getOutParameterValue, getOutParameterValue, getParserStatement, getRef, getRef, getReturnCodeValue, getRowCount, getRowId, getRowId, getRowMetaData, getShort, getShort, getShortColumn, getShortColumn, getSQLXML, getSQLXML, getStatement, getString, getString, getStringColumn, getStringColumn, getTime, getTime, getTime, getTime, getTimeColumn, getTimeColumn, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getTimestampColumn, getTimestampColumn, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertIntoRowSet, insertIntoRowSet, insertRow, isEmpty, isProtected, isReadOnly, isWrapperFor, moveToCurrentRow, moveToInsertRow, newRow, populateOutParameters, protect, refreshRow, removeRowSetListener, rowDeleted, rowInserted, rowUpdated, selectFromRowSet, selectFromRowSet, setFetchDirection, setOutParameterValue, setOutParameterValue, setParserStatement, setReadOnly, setReturnCodeValue, sortRows, toDataFrame, toText, toTupleSet, unprotect, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateRowSet, updateRowSet, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
getSerialVersionUID
public RowSetProxy(RowMetaData rowMetaData)
public RowSetProxy(RowSet rowSet)
public boolean isScrollable()
public void setIsScrollable(boolean isScrollable)
public boolean absolute(int row) throws SQLException
RowSet
ResultSet
object.absolute
in interface ResultSet
absolute
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
row
- the number of the row to which the cursor should move. A
positive number indicates the row number counting from the
beginning of the result set; a negative number indicates the row
number counting from the end of the result settrue
if the cursor is on the result set;
false
otherwiseSQLException
- if a database access error
occurs; this method is called on a closed result set
or the result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic void beforeFirst() throws SQLException
RowSet
ResultSet
object, just
before the first row.beforeFirst
in interface ResultSet
beforeFirst
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
SQLException
- if a database access error
occurs; this method is called on a closed result set or the
result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic void afterLast() throws SQLException
RowSet
ResultSet
object, just
after the last row.afterLast
in interface ResultSet
afterLast
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
SQLException
- if a database access error
occurs; this method is called on a closed result set
or the result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean first() throws SQLException
RowSet
ResultSet
object.first
in interface ResultSet
first
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is on a valid row;
false
if there are no rows in the result setSQLException
- if a database access error
occurs; this method is called on a closed result set
or the result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean last() throws SQLException
RowSet
ResultSet
object.last
in interface ResultSet
last
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is on a valid row;
false
if there are no rows in the result setSQLException
- if a database access error
occurs; this method is called on a closed result set
or the result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean relative(int rowsCount) throws SQLException
RowSet
relative
in interface ResultSet
relative
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
rowsCount
- an int
specifying the number of rows to move from
the current row; a positive number moves the cursor forward; a
negative number moves the cursor backwardtrue
if the cursor is on a row; false
otherwiseSQLException
- if a database access error occurs; this method
is called on a closed result set or the result set type is
TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean previous() throws SQLException
RowSet
ResultSet
object.previous
in interface ResultSet
previous
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is on a valid row;
false
if it is off the result setSQLException
- if a database access error
occurs; this method is called on a closed result set
or the result set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean isAfterLast() throws SQLException
RowSet
ResultSet
object.isAfterLast
in interface ResultSet
isAfterLast
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is after the last row;
false
if the cursor is at any other position or the
result set contains no rowsSQLException
- if a database access error occurs or this method is
called on a closed result setSQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean isBeforeFirst()
RowSet
ResultSet
object.isBeforeFirst
in interface ResultSet
isBeforeFirst
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is before the first row;
false
if the cursor is at any other position or the
result set contains no rowspublic boolean isFirst()
RowSet
ResultSet
object.public boolean isLast() throws SQLException
RowSet
ResultSet
object.isLast
in interface ResultSet
isLast
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the cursor is on the last row;
false
otherwiseSQLException
- if a database access error occurs or this method is
called on a closed result setSQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic boolean next() throws SQLException
RowSet
next
in interface ResultSet
next
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
true
if the new current row is valid;
false
if there are no more rowsSQLException
- if a database access error occurs or this method is
called on a closed result setpublic int getRow() throws SQLException
ResultSet
Note:Support for the getRow
method
is optional for ResultSet
s with a result
set type of TYPE_FORWARD_ONLY
getRow
in interface ResultSet
getRow
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
0
if there is no current rowSQLException
- if a database access error occurs
or this method is called on a closed result setSQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodpublic void close()
RowSet
RowSet
.public boolean isClosed()
ResultSet
ResultSet
object has been closed. A ResultSet
is closed if the
method close has been called on it, or if it is automatically closed.public int getFetchSize() throws SQLException
ResultSet
ResultSet
object.getFetchSize
in interface ResultSet
getFetchSize
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
ResultSet
objectSQLException
- if a database access error occurs
or this method is called on a closed result setResultSet.setFetchSize(int)
public void setFetchSize(int fetchSize) throws SQLException
ResultSet
ResultSet
object.
If the fetch size specified is zero, the JDBC driver
ignores the value and is free to make its own best guess as to what
the fetch size should be. The default value is set by the
Statement
object
that created the result set. The fetch size may be changed at any time.setFetchSize
in interface ResultSet
setFetchSize
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
fetchSize
- the number of rows to fetchSQLException
- if a database access error occurs; this method
is called on a closed result set or the
condition rows >= 0
is not satisfiedResultSet.getFetchSize()
public void setPageSize(int pageSize) throws SQLException
RowSetInterface
RowSet
object's page-size. A RowSet
may be configured to populate itself in page-size sized batches of rows. When
either next()
or nextPage()
are called, the
RowSet
fetches an additional page. Actually the same as setFetchSize(int)
.setPageSize
in interface RowSetInterface
setPageSize
in class RowSet
SQLException
- if an error occurs setting the RowSet
page size or if the page size is less than 0.public int getPageSize() throws SQLException
RowSetInterface
RowSet
object
Actually the same as getFetchSize
.getPageSize
in interface RowSetInterface
getPageSize
in class RowSet
int
page sizeSQLException
public Row getCurrentRow() throws SQLException
RowSetInterface
getCurrentRow
in interface RowSetInterface
getCurrentRow
in class com.streamscape.sef.dispatcher.AbstractRowSetProxy
SQLException
public Row getRowAt(int index) throws SQLException
RowSet
getRowAt
in interface RowSetInterface
getRowAt
in class RowSet
index
- index of the row to get, the first row is 1, the second is 2, ...SQLException
public RowSet asRowSet() throws SQLException
RowSetInterface
asRowSet
in interface RowSetInterface
asRowSet
in class RowSet
SQLException
public boolean nextPage() throws SQLException
RowSetInterface
RowSet
. This causes
the RowSet
implementation to fetch the next page-size
rows. Pointer will be set on the first row of the new page.
If false returned, RowSet becomes the same.nextPage
in interface RowSetInterface
nextPage
in class RowSet
SQLException
- if an error occurs fetching the next pagepublic boolean previousPage() throws SQLException
RowSetInterface
RowSet
. This causes
the RowSet
implementation to fetch the previous page-size
rows. Pointer will be set on the first row of the new page.
If false returned, RowSet becomes the same.previousPage
in interface RowSetInterface
previousPage
in class RowSet
SQLException
- if an error occurs fetching the previous page.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.