Interface JdbcRowSet
- All Superinterfaces:
AutoCloseable, Joinable, ResultSet, RowSet, Wrapper
public interface JdbcRowSet extends RowSet, Joinable
JdbcRowSet must implement. 1.0 Overview
A wrapper around aResultSet object that makes it possible to use the result set as a JavaBeans component. Thus, a JdbcRowSet object can be one of the Beans that a tool makes available for composing an application. Because a JdbcRowSet is a connected rowset, that is, it continually maintains its connection to a database using a JDBC technology-enabled driver, it also effectively makes the driver a JavaBeans component. Because it is always connected to its database, an instance of JdbcRowSet can simply take calls invoked on it and in turn call them on its ResultSet object. As a consequence, a result set can, for example, be a component in a Swing application.
Another advantage of a JdbcRowSet object is that it can be used to make a ResultSet object scrollable and updatable. All RowSet objects are by default scrollable and updatable. If the driver and database being used do not support scrolling and/or updating of result sets, an application can populate a JdbcRowSet object with the data of a ResultSet object and then operate on the JdbcRowSet object as if it were the ResultSet object.
2.0 Creating a JdbcRowSet Object
The reference implementation of the JdbcRowSet interface, JdbcRowSetImpl, provides an implementation of the default constructor. A new instance is initialized with default values, which can be set with new values as needed. A new instance is not really functional until its execute method is called. In general, this method does the following: - establishes a connection with a database
- creates a
PreparedStatementobject and sets any of its placeholder parameters - executes the statement to create a
ResultSetobject
execute method is successful, it will set the appropriate private JdbcRowSet fields with the following: - a
Connectionobject -- the connection between the rowset and the database - a
PreparedStatementobject -- the query that produces the result set - a
ResultSetobject -- the result set that the rowset's command produced and that is being made, in effect, a JavaBeans component
execute method has not executed successfully, no methods other than execute and close may be called on the rowset. All other public methods will throw an exception. Before calling the execute method, however, the command and properties needed for establishing a connection must be set. The following code fragment creates a JdbcRowSetImpl object, sets the command and connection properties, sets the placeholder parameter, and then invokes the method execute.
JdbcRowSetImpl jrs = new JdbcRowSetImpl();
jrs.setCommand("SELECT * FROM TITLES WHERE TYPE = ?");
jrs.setURL("jdbc:myDriver:myAttribute");
jrs.setUsername("cervantes");
jrs.setPassword("sancho");
jrs.setString(1, "BIOGRAPHY");
jrs.execute();
The variable jrs now represents an instance of JdbcRowSetImpl that is a thin wrapper around the ResultSet object containing all the rows in the table TITLES where the type of book is biography. At this point, operations called on jrs will affect the rows in the result set, which is effectively a JavaBeans component. The implementation of the RowSet method execute in the JdbcRowSet reference implementation differs from that in the CachedRowSet reference implementation to account for the different requirements of connected and disconnected RowSet objects.
- Since:
- 1.5
Field Summary
Fields declared in interface ResultSet
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 | Modifier and Type | Field | Description |
|---|---|---|
static final int |
CLOSE_CURSORS_AT_COMMIT |
The constant indicating that open ResultSet objects with this holdability will be closed when the current transaction is committed. |
static final int |
CONCUR_READ_ONLY |
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated. |
static final int |
CONCUR_UPDATABLE |
The constant indicating the concurrency mode for a ResultSet object that may be updated. |
static final int |
FETCH_FORWARD |
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last. |
static final int |
FETCH_REVERSE |
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first. |
static final int |
FETCH_UNKNOWN |
The constant indicating that the order in which rows in a result set will be processed is unknown. |
static final int |
HOLD_CURSORS_OVER_COMMIT |
The constant indicating that open ResultSet objects with this holdability will remain open when the current transaction is committed. |
static final int |
TYPE_FORWARD_ONLY |
The constant indicating the type for a ResultSet object whose cursor may move only forward. |
static final int |
TYPE_SCROLL_INSENSITIVE |
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes to the data that underlies the ResultSet. |
static final int |
TYPE_SCROLL_SENSITIVE |
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes to the data that underlies the ResultSet. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
void |
commit() |
Each JdbcRowSet contains a Connection object from the ResultSet or JDBC properties passed to it's constructors. |
boolean |
getAutoCommit() |
Each JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. |
RowSetWarning |
getRowSetWarnings() |
Retrieves the first warning reported by calls on this JdbcRowSet object. |
boolean |
getShowDeleted() |
Retrieves a boolean indicating whether rows marked for deletion appear in the set of current rows. |
void |
rollback() |
Each JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. |
void |
rollback |
Each JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. |
void |
setAutoCommit |
Each JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. |
void |
setShowDeleted |
Sets the property showDeleted to the given boolean value. |
Methods declared in interface Joinable
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn | Modifier and Type | Method | Description |
|---|---|---|
int[] |
getMatchColumnIndexes() |
Retrieves the indexes of the match columns that were set for this RowSet object with the method setMatchColumn(int[] columnIdxes). |
String[] |
getMatchColumnNames() |
Retrieves the names of the match columns that were set for this RowSet object with the method setMatchColumn(String [] columnNames). |
void |
setMatchColumn |
Sets the designated column as the match column for this RowSet object. |
void |
setMatchColumn |
Sets the designated columns as the match column for this RowSet object. |
void |
setMatchColumn |
Sets the designated column as the match column for this RowSet object. |
void |
setMatchColumn |
Sets the designated columns as the match column for this RowSet object. |
void |
unsetMatchColumn |
Unsets the designated column as the match column for this RowSet object. |
void |
unsetMatchColumn |
Unsets the designated columns as the match column for this RowSet object. |
void |
unsetMatchColumn |
Unsets the designated column as the match column for this RowSet object. |
void |
unsetMatchColumn |
Unsets the designated columns as the match columns for this RowSet object. |
Methods declared in interface ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, 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, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull | Modifier and Type | Method | Description |
|---|---|---|
boolean |
absolute |
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. |
void |
beforeFirst() |
Moves the cursor to the front of this ResultSet object, just before the first row. |
void |
cancelRowUpdates() |
Cancels the updates made to the current row in this ResultSet object. |
void |
clearWarnings() |
Clears all warnings reported on this ResultSet object. |
void |
close() |
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. |
void |
deleteRow() |
Deletes the current row from this ResultSet object and from the underlying database. |
int |
findColumn |
Maps the given ResultSet column label to its ResultSet column index. |
boolean |
first() |
Moves the cursor to the first row in this ResultSet object. |
Array |
getArray |
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language. |
Array |
getArray |
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language. |
InputStream |
getAsciiStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. |
InputStream |
getAsciiStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. |
BigDecimal |
getBigDecimal |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision. |
BigDecimal |
getBigDecimal |
Deprecated. |
BigDecimal |
getBigDecimal |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision. |
BigDecimal |
getBigDecimal |
Deprecated. Use getBigDecimal(int columnIndex) or getBigDecimal(String columnLabel)
|
InputStream |
getBinaryStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. |
InputStream |
getBinaryStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. |
Blob |
getBlob |
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language. |
Blob |
getBlob |
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language. |
boolean |
getBoolean |
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language. |
boolean |
getBoolean |
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language. |
byte |
getByte |
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language. |
byte |
getByte |
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language. |
byte[] |
getBytes |
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. |
byte[] |
getBytes |
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. |
Reader |
getCharacterStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. |
Reader |
getCharacterStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. |
Clob |
getClob |
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language. |
Clob |
getClob |
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language. |
int |
getConcurrency() |
Retrieves the concurrency mode of this ResultSet object. |
String |
getCursorName() |
Retrieves the name of the SQL cursor used by this ResultSet object. |
Date |
getDate |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
Date |
getDate |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
Date |
getDate |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
Date |
getDate |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
double |
getDouble |
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language. |
double |
getDouble |
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language. |
int |
getFetchDirection() |
Retrieves the fetch direction for this ResultSet object. |
int |
getFetchSize() |
Retrieves the fetch size for this ResultSet object. |
float |
getFloat |
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language. |
float |
getFloat |
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language. |
int |
getHoldability() |
Retrieves the holdability of this ResultSet object |
int |
getInt |
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language. |
int |
getInt |
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language. |
long |
getLong |
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language. |
long |
getLong |
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language. |
ResultSetMetaData |
getMetaData() |
Retrieves the number, types and properties of this ResultSet object's columns. |
Reader |
getNCharacterStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. |
Reader |
getNCharacterStream |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. |
NClob |
getNClob |
Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language. |
NClob |
getNClob |
Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language. |
String |
getNString |
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. |
String |
getNString |
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. |
Object |
getObject |
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. |
<T> T |
getObject |
Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. |
Object |
getObject |
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. |
Object |
getObject |
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. |
<T> T |
getObject |
Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. |
Object |
getObject |
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. |
Ref |
getRef |
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language. |
Ref |
getRef |
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language. |
int |
getRow() |
Retrieves the current row number. |
RowId |
getRowId |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language. |
RowId |
getRowId |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language. |
short |
getShort |
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language. |
short |
getShort |
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language. |
SQLXML |
getSQLXML |
Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language. |
SQLXML |
getSQLXML |
Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language. |
Statement |
getStatement() |
Retrieves the Statement object that produced this ResultSet object. |
String |
getString |
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. |
String |
getString |
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. |
Time |
getTime |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
Time |
getTime |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
Time |
getTime |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
Time |
getTime |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
Timestamp |
getTimestamp |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. |
Timestamp |
getTimestamp |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. |
Timestamp |
getTimestamp |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. |
Timestamp |
getTimestamp |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. |
int |
getType() |
Retrieves the type of this ResultSet object. |
InputStream |
getUnicodeStream |
Deprecated. use getCharacterStream in place of getUnicodeStream
|
InputStream |
getUnicodeStream |
Deprecated. use getCharacterStream instead |
URL |
getURL |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language. |
URL |
getURL |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language. |
SQLWarning |
getWarnings() |
Retrieves the first warning reported by calls on this ResultSet object. |
void |
insertRow() |
Inserts the contents of the insert row into this ResultSet object and into the database. |
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 |
last() |
Moves the cursor to the last row in this ResultSet object. |
void |
moveToCurrentRow() |
Moves the cursor to the remembered cursor position, usually the current row. |
void |
moveToInsertRow() |
Moves the cursor to the insert row. |
boolean |
next() |
Moves the cursor forward one row from its current position. |
boolean |
previous() |
Moves the cursor to the previous row in this ResultSet object. |
void |
refreshRow() |
Refreshes the current row with its most recent value in the database. |
boolean |
relative |
Moves the cursor a relative number of rows, either positive or negative. |
boolean |
rowDeleted() |
Retrieves whether a row has been deleted. |
boolean |
rowInserted() |
Retrieves whether the current row has had an insertion. |
boolean |
rowUpdated() |
Retrieves whether the current row has been updated. |
void |
setFetchDirection |
Gives a hint as to the direction in which the rows in this ResultSet object will be processed. |
void |
setFetchSize |
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 |
updateArray |
Updates the designated column with a java.sql.Array value. |
void |
updateArray |
Updates the designated column with a java.sql.Array value. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
void |
updateAsciiStream |
Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
void |
updateBigDecimal |
Updates the designated column with a java.math.BigDecimal value. |
void |
updateBigDecimal |
Updates the designated column with a java.sql.BigDecimal value. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value, which will have the specified number of bytes. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value, which will have the specified number of bytes. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value, which will have the specified number of bytes. |
void |
updateBinaryStream |
Updates the designated column with a binary stream value, which will have the specified number of bytes. |
void |
updateBlob |
Updates the designated column using the given input stream. |
void |
updateBlob |
Updates the designated column using the given input stream, which will have the specified number of bytes. |
void |
updateBlob |
Updates the designated column with a java.sql.Blob value. |
void |
updateBlob |
Updates the designated column using the given input stream. |
void |
updateBlob |
Updates the designated column using the given input stream, which will have the specified number of bytes. |
void |
updateBlob |
Updates the designated column with a java.sql.Blob value. |
void |
updateBoolean |
Updates the designated column with a boolean value. |
void |
updateBoolean |
Updates the designated column with a boolean value. |
void |
updateByte |
Updates the designated column with a byte value. |
void |
updateByte |
Updates the designated column with a byte value. |
void |
updateBytes |
Updates the designated column with a byte array value. |
void |
updateBytes |
Updates the designated column with a byte array value. |
void |
updateCharacterStream |
Updates the designated column with a character stream value. |
void |
updateCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateCharacterStream |
Updates the designated column with a character stream value. |
void |
updateCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateClob |
Updates the designated column using the given Reader object. |
void |
updateClob |
Updates the designated column using the given Reader object, which is the given number of characters long. |
void |
updateClob |
Updates the designated column with a java.sql.Clob value. |
void |
updateClob |
Updates the designated column using the given Reader object. |
void |
updateClob |
Updates the designated column using the given Reader object, which is the given number of characters long. |
void |
updateClob |
Updates the designated column with a java.sql.Clob value. |
void |
updateDate |
Updates the designated column with a java.sql.Date value. |
void |
updateDate |
Updates the designated column with a java.sql.Date value. |
void |
updateDouble |
Updates the designated column with a double value. |
void |
updateDouble |
Updates the designated column with a double value. |
void |
updateFloat |
Updates the designated column with a float value. |
void |
updateFloat |
Updates the designated column with a float value. |
void |
updateInt |
Updates the designated column with an int value. |
void |
updateInt |
Updates the designated column with an int value. |
void |
updateLong |
Updates the designated column with a long value. |
void |
updateLong |
Updates the designated column with a long value. |
void |
updateNCharacterStream |
Updates the designated column with a character stream value. |
void |
updateNCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateNCharacterStream |
Updates the designated column with a character stream value. |
void |
updateNCharacterStream |
Updates the designated column with a character stream value, which will have the specified number of bytes. |
void |
updateNClob |
Updates the designated column using the given Reader The data will be read from the stream as needed until end-of-stream is reached. |
void |
updateNClob |
Updates the designated column using the given Reader object, which is the given number of characters long. |
void |
updateNClob |
Updates the designated column with a java.sql.NClob value. |
void |
updateNClob |
Updates the designated column using the given Reader object. |
void |
updateNClob |
Updates the designated column using the given Reader object, which is the given number of characters long. |
void |
updateNClob |
Updates the designated column with a java.sql.NClob value. |
void |
updateNString |
Updates the designated column with a String value. |
void |
updateNString |
Updates the designated column with a String value. |
void |
updateNull |
Updates the designated column with a null value. |
void |
updateNull |
Updates the designated column with a null value. |
void |
updateObject |
Updates the designated column with an Object value. |
void |
updateObject |
Updates the designated column with an Object value. |
default void |
updateObject |
Updates the designated column with an Object value. |
default void |
updateObject |
Updates the designated column with an Object value. |
void |
updateObject |
Updates the designated column with an Object value. |
void |
updateObject |
Updates the designated column with an Object value. |
default void |
updateObject |
Updates the designated column with an Object value. |
default void |
updateObject |
Updates the designated column with an Object value. |
void |
updateRef |
Updates the designated column with a java.sql.Ref value. |
void |
updateRef |
Updates the designated column with a java.sql.Ref value. |
void |
updateRow() |
Updates the underlying database with the new contents of the current row of this ResultSet object. |
void |
updateRowId |
Updates the designated column with a RowId value. |
void |
updateRowId |
Updates the designated column with a RowId value. |
void |
updateShort |
Updates the designated column with a short value. |
void |
updateShort |
Updates the designated column with a short value. |
void |
updateSQLXML |
Updates the designated column with a java.sql.SQLXML value. |
void |
updateSQLXML |
Updates the designated column with a java.sql.SQLXML value. |
void |
updateString |
Updates the designated column with a String value. |
void |
updateString |
Updates the designated column with a String value. |
void |
updateTime |
Updates the designated column with a java.sql.Time value. |
void |
updateTime |
Updates the designated column with a java.sql.Time value. |
void |
updateTimestamp |
Updates the designated column with a java.sql.Timestamp value. |
void |
updateTimestamp |
Updates the designated column with a java.sql.Timestamp value. |
boolean |
wasNull() |
Reports whether the last column read had a value of SQL NULL. |
Methods declared in interface RowSet
addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDate, setDate, setDouble, setDouble, setEscapeProcessing, setFloat, setFloat, setInt, setInt, setLong, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setRowId, setRowId, setShort, setShort, setSQLXML, setSQLXML, setString, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setURL, setUsername | Modifier and Type | Method | Description |
|---|---|---|
void |
addRowSetListener |
Registers the given listener so that it will be notified of events that occur on this RowSet object. |
void |
clearParameters() |
Clears the parameters set for this RowSet object's command. |
void |
execute() |
Fills this RowSet object with data. |
String |
getCommand() |
Retrieves this RowSet object's command property. |
String |
getDataSourceName() |
Retrieves the logical name that identifies the data source for this RowSet object. |
boolean |
getEscapeProcessing() |
Retrieves whether escape processing is enabled for this RowSet object. |
int |
getMaxFieldSize() |
Retrieves the maximum number of bytes that may be returned for certain column values. |
int |
getMaxRows() |
Retrieves the maximum number of rows that this RowSet object can contain. |
String |
getPassword() |
Retrieves the password used to create a database connection. |
int |
getQueryTimeout() |
Retrieves the maximum number of seconds the driver will wait for a statement to execute. |
int |
getTransactionIsolation() |
Retrieves the transaction isolation level set for this RowSet object. |
Map |
getTypeMap() |
Retrieves the Map object associated with this RowSet object, which specifies the custom mapping of SQL user-defined types, if any. |
String |
getUrl() |
Retrieves the url property this RowSet object will use to create a connection if it uses the DriverManager instead of a DataSource object to establish the connection. |
String |
getUsername() |
Retrieves the username used to create a database connection for this RowSet object. |
boolean |
isReadOnly() |
Retrieves whether this RowSet object is read-only. |
void |
removeRowSetListener |
Removes the specified listener from the list of components that will be notified when an event occurs on this RowSet object. |
void |
setArray |
Sets the designated parameter in this RowSet object's command with the given Array value. |
void |
setAsciiStream |
Sets the designated parameter in this RowSet object's command to the given input stream. |
void |
setAsciiStream |
Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. |
void |
setAsciiStream |
Sets the designated parameter to the given input stream. |
void |
setAsciiStream |
Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void |
setBigDecimal |
Sets the designated parameter in this RowSet object's command to the given java.math.BigDecimal value. |
void |
setBigDecimal |
Sets the designated parameter to the given java.math.BigDecimal value. |
void |
setBinaryStream |
Sets the designated parameter in this RowSet object's command to the given input stream. |
void |
setBinaryStream |
Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. |
void |
setBinaryStream |
Sets the designated parameter to the given input stream. |
void |
setBinaryStream |
Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void |
setBlob |
Sets the designated parameter to a InputStream object. |
void |
setBlob |
Sets the designated parameter to a InputStream object. |
void |
setBlob |
Sets the designated parameter in this RowSet object's command with the given Blob value. |
void |
setBlob |
Sets the designated parameter to a InputStream object. |
void |
setBlob |
Sets the designated parameter to a InputStream object. |
void |
setBlob |
Sets the designated parameter to the given java.sql.Blob object. |
void |
setBoolean |
Sets the designated parameter in this RowSet object's command to the given Java boolean value. |
void |
setBoolean |
Sets the designated parameter to the given Java boolean value. |
void |
setByte |
Sets the designated parameter in this RowSet object's command to the given Java byte value. |
void |
setByte |
Sets the designated parameter to the given Java byte value. |
void |
setBytes |
Sets the designated parameter in this RowSet object's command to the given Java array of byte values. |
void |
setBytes |
Sets the designated parameter to the given Java array of bytes. |
void |
setCharacterStream |
Sets the designated parameter in this RowSet object's command to the given Reader object. |
void |
setCharacterStream |
Sets the designated parameter in this RowSet object's command to the given java.io.Reader value. |
void |
setCharacterStream |
Sets the designated parameter to the given Reader object. |
void |
setCharacterStream |
Sets the designated parameter to the given Reader object, which is the given number of characters long. |
void |
setClob |
Sets the designated parameter to a Reader object. |
void |
setClob |
Sets the designated parameter to a Reader object. |
void |
setClob |
Sets the designated parameter in this RowSet object's command with the given Clob value. |
void |
setClob |
Sets the designated parameter to a Reader object. |
void |
setClob |
Sets the designated parameter to a Reader object. |
void |
setClob |
Sets the designated parameter to the given java.sql.Clob object. |
void |
setCommand |
Sets this RowSet object's command property to the given SQL query. |
void |
setConcurrency |
Sets the concurrency of this RowSet object to the given concurrency level. |
void |
setDataSourceName |
Sets the data source name property for this RowSet object to the given String. |
void |
setDate |
Sets the designated parameter in this RowSet object's command to the given java.sql.Date value. |
void |
setDate |
Sets the designated parameter in this RowSet object's command with the given java.sql.Date value. |
void |
setDate |
Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. |
void |
setDate |
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. |
void |
setDouble |
Sets the designated parameter in this RowSet object's command to the given Java double value. |
void |
setDouble |
Sets the designated parameter to the given Java double value. |
void |
setEscapeProcessing |
Sets escape processing for this RowSet object on or off. |
void |
setFloat |
Sets the designated parameter in this RowSet object's command to the given Java float value. |
void |
setFloat |
Sets the designated parameter to the given Java float value. |
void |
setInt |
Sets the designated parameter in this RowSet object's command to the given Java int value. |
void |
setInt |
Sets the designated parameter to the given Java int value. |
void |
setLong |
Sets the designated parameter in this RowSet object's command to the given Java long value. |
void |
setLong |
Sets the designated parameter to the given Java long value. |
void |
setMaxFieldSize |
Sets the maximum number of bytes that can be returned for a column value to the given number of bytes. |
void |
setMaxRows |
Sets the maximum number of rows that this RowSet object can contain to the specified number. |
void |
setNCharacterStream |
Sets the designated parameter in this RowSet object's command to a Reader object. |
void |
setNCharacterStream |
Sets the designated parameter to a Reader object. |
void |
setNCharacterStream |
Sets the designated parameter to a Reader object. |
void |
setNCharacterStream |
Sets the designated parameter to a Reader object. |
void |
setNClob |
Sets the designated parameter to a Reader object. |
void |
setNClob |
Sets the designated parameter to a Reader object. |
void |
setNClob |
Sets the designated parameter to a java.sql.NClob object. |
void |
setNClob |
Sets the designated parameter to a Reader object. |
void |
setNClob |
Sets the designated parameter to a Reader object. |
void |
setNClob |
Sets the designated parameter to a java.sql.NClob object. |
void |
setNString |
Sets the designated parameter to the given String object. |
void |
setNString |
Sets the designated parameter to the given String object. |
void |
setNull |
Sets the designated parameter in this RowSet object's SQL command to SQL NULL. |
void |
setNull |
Sets the designated parameter in this RowSet object's SQL command to SQL NULL. |
void |
setNull |
Sets the designated parameter to SQL NULL. |
void |
setNull |
Sets the designated parameter to SQL NULL. |
void |
setObject |
Sets the designated parameter in this RowSet object's command with a Java Object. |
void |
setObject |
Sets the designated parameter in this RowSet object's command with a Java Object. |
void |
setObject |
Sets the designated parameter in this RowSet object's command with the given Java Object. |
void |
setObject |
Sets the value of the designated parameter with the given object. |
void |
setObject |
Sets the value of the designated parameter with the given object. |
void |
setObject |
Sets the value of the designated parameter with the given object. |
void |
setPassword |
Sets the database password for this RowSet object to the given String. |
void |
setQueryTimeout |
Sets the maximum time the driver will wait for a statement to execute to the given number of seconds. |
void |
setReadOnly |
Sets whether this RowSet object is read-only to the given boolean. |
void |
setRef |
Sets the designated parameter in this RowSet object's command with the given Ref value. |
void |
setRowId |
Sets the designated parameter to the given java.sql.RowId object. |
void |
setRowId |
Sets the designated parameter to the given java.sql.RowId object. |
void |
setShort |
Sets the designated parameter in this RowSet object's command to the given Java short value. |
void |
setShort |
Sets the designated parameter to the given Java short value. |
void |
setSQLXML |
Sets the designated parameter to the given java.sql.SQLXML object. |
void |
setSQLXML |
Sets the designated parameter to the given java.sql.SQLXML object. |
void |
setString |
Sets the designated parameter in this RowSet object's command to the given Java String value. |
void |
setString |
Sets the designated parameter to the given Java String value. |
void |
setTime |
Sets the designated parameter in this RowSet object's command to the given java.sql.Time value. |
void |
setTime |
Sets the designated parameter in this RowSet object's command with the given java.sql.Time value. |
void |
setTime |
Sets the designated parameter to the given java.sql.Time value. |
void |
setTime |
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. |
void |
setTimestamp |
Sets the designated parameter in this RowSet object's command to the given java.sql.Timestamp value. |
void |
setTimestamp |
Sets the designated parameter in this RowSet object's command with the given java.sql.Timestamp value. |
void |
setTimestamp |
Sets the designated parameter to the given java.sql.Timestamp value. |
void |
setTimestamp |
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. |
void |
setTransactionIsolation |
Sets the transaction isolation level for this RowSet object. |
void |
setType |
Sets the type of this RowSet object to the given type. |
void |
setTypeMap |
Installs the given java.util.Map object as the default type map for this RowSet object. |
void |
setUrl |
Sets the URL this RowSet object will use when it uses the DriverManager to create a connection. |
void |
setURL |
Sets the designated parameter to the given java.net.URL value. |
void |
setUsername |
Sets the username property for this RowSet object to the given String. |
Methods declared in interface Wrapper
isWrapperFor, unwrap | Modifier and Type | Method | Description |
|---|---|---|
boolean |
isWrapperFor |
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
<T> T |
unwrap |
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |
Method Details
getShowDeleted
boolean getShowDeleted() throws SQLException
boolean indicating whether rows marked for deletion appear in the set of current rows. If true is returned, deleted rows are visible with the current rows. If false is returned, rows are not visible with the set of current rows. The default value is false. Standard rowset implementations may choose to restrict this behavior for security considerations or for certain deployment scenarios. The visibility of deleted rows is implementation-defined and does not represent standard behavior.
Note: Allowing deleted rows to remain visible complicates the behavior of some standard JDBC RowSet implementations methods. However, most rowset users can simply ignore this extra detail because only very specialized applications will likely want to take advantage of this feature.
- Returns:
-
trueif deleted rows are visible;falseotherwise - Throws:
-
SQLException- if a rowset implementation is unable to to determine whether rows marked for deletion remain visible - See Also:
setShowDeleted
void setShowDeleted(boolean b) throws SQLException
showDeleted to the given boolean value. This property determines whether rows marked for deletion continue to appear in the set of current rows. If the value is set to true, deleted rows are immediately visible with the set of current rows. If the value is set to false, the deleted rows are set as invisible with the current set of rows. Standard rowset implementations may choose to restrict this behavior for security considerations or for certain deployment scenarios. This is left as implementation-defined and does not represent standard behavior.
- Parameters:
-
b-trueif deleted rows should be shown;falseotherwise - Throws:
-
SQLException- if a rowset implementation is unable to to reset whether deleted rows should be visible - See Also:
getRowSetWarnings
RowSetWarning getRowSetWarnings() throws SQLException
JdbcRowSet object. If a second warning was reported on this JdbcRowSet object, it will be chained to the first warning and can be retrieved by calling the method RowSetWarning.getNextWarning on the first warning. Subsequent warnings on this JdbcRowSet object will be chained to the RowSetWarning objects returned by the method RowSetWarning.getNextWarning. The warning chain is automatically cleared each time a new row is read. This method may not be called on a RowSet object that has been closed; doing so will cause an SQLException to be thrown. Because it is always connected to its data source, a JdbcRowSet object can rely on the presence of active Statement, Connection, and ResultSet instances. This means that applications can obtain additional SQLWarning notifications by calling the getNextWarning methods that they provide. Disconnected Rowset objects, such as a CachedRowSet object, do not have access to these getNextWarning methods.
- Returns:
- the first
RowSetWarningobject reported on thisJdbcRowSetobject ornullif there are none - Throws:
-
SQLException- if this method is called on a closedJdbcRowSetobject - See Also:
commit
void commit() throws SQLException
JdbcRowSet contains a Connection object from the ResultSet or JDBC properties passed to it's constructors. This method wraps the Connection commit method to allow flexible auto commit or non auto commit transactional control support. Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.
- Throws:
-
SQLException- if a database access error occurs or this Connection object within thisJdbcRowSetis in auto-commit mode - See Also:
getAutoCommit
boolean getAutoCommit() throws SQLException
JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. This method wraps the Connection's getAutoCommit method to allow an application to determine the JdbcRowSet transaction behavior. Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode.
- Returns:
-
trueif auto-commit is enabled;falseotherwise - Throws:
-
SQLException- if a database access error occurs - See Also:
setAutoCommit
void setAutoCommit(boolean autoCommit) throws SQLException
JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. This method wraps the Connection's getAutoCommit method to allow an application to set the JdbcRowSet transaction behavior. Sets the current auto-commit mode for this Connection object.
- Parameters:
-
autoCommit-trueto enable auto-commit;falseto disable auto-commit - Throws:
-
SQLException- if a database access error occurs - See Also:
rollback
void rollback() throws SQLException
JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.- Throws:
-
SQLException- if a database access error occurs or thisConnectionobject within thisJdbcRowSetis in auto-commit mode. - See Also:
rollback
void rollback(Savepoint s) throws SQLException
JdbcRowSet contains a Connection object from the original ResultSet or JDBC properties passed to it. Undoes all changes made in the current transaction to the last set savepoint and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.- Parameters:
-
s- TheSavepointto rollback to - Throws:
-
SQLException- if a database access error occurs or thisConnectionobject within thisJdbcRowSetis in auto-commit mode. - See Also:
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
getBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel)