The standard interface that all standard implementations of JdbcRowSet must implement.

1.0 Overview

A wrapper around a ResultSet object that makes it possible to use the result set as a JavaBeansTM 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: If the execute method is successful, it will set the appropriate private JdbcRowSet fields with the following: If these fields have not been set, meaning that the 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 CachedRowSetTM reference implementation to account for the different requirements of connected and disconnected RowSet objects.

@author
Jonathan Bruce
Registers the given listener so that it will be notified of events that occur on this RowSet object.
Parameters
listenera component that has implemented the RowSetListener interface and wants to be notified when events occur on this RowSet object
Clears the parameters set for this RowSet object's command.

In general, parameter values remain in force for repeated use of a RowSet object. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values, which can be done by calling the method clearParameters.

Throws
SQLExceptionif a database access error occurs
Each 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
SQLExceptionif a database access error occurs or this Connection object within this JdbcRowSet is in auto-commit mode
Fills this RowSet object with data.

The execute method may use the following properties to create a connection for reading data: url, data source name, user name, password, transaction isolation, and type map. The execute method may use the following properties to create a statement to execute a command: command, read only, maximum field size, maximum rows, escape processing, and query timeout.

If the required properties have not been set, an exception is thrown. If this method is successful, the current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are ignored.

If this RowSet object does not maintain a continuous connection with its source of data, it may use a reader (a RowSetReader object) to fill itself with data. In this case, a reader will have been registered with this RowSet object, and the method execute will call on the reader's readData method as part of its implementation.

Throws
SQLExceptionif a database access error occurs or any of the properties necessary for making a connection and creating a statement have not been set
Each 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.

Throws
SQLExceptionif a database access error occurs
Retrieves this RowSet object's command property. The command property contains a command string, which must be an SQL query, that can be executed to fill the rowset with data. The default value is null.
Return
the command string; may be null
See Also
Retrieves the logical name that identifies the data source for this RowSet object. Users should set either the url property or the data source name property. The rowset will use the property that was set more recently to get a connection.
Return
a data source name
Retrieves whether escape processing is enabled for this RowSet object. If escape scanning is enabled, which is the default, the driver will do escape substitution before sending an SQL statement to the database.
Return
true if escape processing is enabled; false if it is disabled
Throws
SQLExceptionif a database access error occurs
Retrieves the indexes of the match columns that were set for this RowSet object with the method setMatchColumn(int[] columnIdxes).
Return
an int array identifying the indexes of the columns that were set as the match columns for this RowSet object
Throws
SQLExceptionif no match column has been set
Retrieves the names of the match columns that were set for this RowSet object with the method setMatchColumn(String [] columnNames).
Return
an array of String objects giving the names of the columns set as the match columns for this RowSet object
Throws
SQLExceptionif no match column has been set
Retrieves the maximum number of bytes that may be returned for certain column values. This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
Return
the current maximum column size limit; zero means that there is no limit
Throws
SQLExceptionif a database access error occurs
Retrieves the maximum number of rows that this RowSet object can contain. If the limit is exceeded, the excess rows are silently dropped.
Return
the current maximum number of rows that this RowSet object can contain; zero means unlimited
Throws
SQLExceptionif a database access error occurs
See Also
Retrieves the password used to create a database connection. The password property is set at run time before calling the method execute. It is not usually part of the serialized state of a RowSet object.
Return
the password for making a database connection
See Also
Retrieves the maximum number of seconds the driver will wait for a statement to execute. If this limit is exceeded, an SQLException is thrown.
Return
the current query timeout limit in seconds; zero means unlimited
Throws
SQLExceptionif a database access error occurs
Retrieves the first warning reported by calls on this 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.

Return
the first RowSetWarning object reported on this JdbcRowSet object or null if there are none
Throws
SQLExceptionif this method is called on a closed JdbcRowSet object
See Also
Retrieves a 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.

Return
true if deleted rows are visible; false otherwise
Throws
SQLExceptionif a rowset implementation is unable to to determine whether rows marked for deletion remain visible
Retrieves the transaction isolation level set for this RowSet object.
Return
the transaction isolation level; one of Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE
Retrieves the Map object associated with this RowSet object, which specifies the custom mapping of SQL user-defined types, if any. The default is for the type map to be empty.
Return
a java.util.Map object containing the names of SQL user-defined types and the Java classes to which they are to be mapped
Throws
SQLExceptionif a database access error occurs
See Also
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. The default value is null.
Return
a string url
Throws
SQLExceptionif a database access error occurs
See Also
Retrieves the username used to create a database connection for this RowSet object. The username property is set at run time before calling the method execute. It is not usually part of the serialized state of a RowSet object.
Return
the username property
See Also
Retrieves whether this RowSet object is read-only. If updates are possible, the default is for a rowset to be updatable.

Attempts to update a read-only rowset will result in an SQLException being thrown.

Return
true if this RowSet object is read-only; false if it is updatable
See Also
Removes the specified listener from the list of components that will be notified when an event occurs on this RowSet object.
Parameters
listenera component that has been registered as a listener for this RowSet object
Each 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
SQLExceptionif a database access error occurs or this Connection object within this JdbcRowSet is in auto-commit mode.
Each 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.
Throws
SQLExceptionif a database access error occurs or this Connection object within this JdbcRowSet is in auto-commit mode.
See Also
Sets the designated parameter in this RowSet object's command with the given Array value. The driver will convert this to the ARRAY value that the Array object represents before sending it to the database.
Parameters
ithe first parameter is 1, the second is 2, ...
xan object representing an SQL array
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. It may be more practical to send a very large ASCII value via a java.io.InputStream rather than as a LONGVARCHAR parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe Java input stream that contains the ASCII parameter value
lengththe number of bytes in the stream
Throws
SQLExceptionif a database access error occurs
Each 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.

Return
the current state of this internal Connection object's auto-commit mode
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.math.BigDeciaml value. The driver converts this to an SQL NUMERIC value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. It may be more practical to send a very large binary value via a java.io.InputStream rather than as a LONGVARBINARY parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe java input stream which contains the binary parameter value
lengththe number of bytes in the stream
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given Blob value. The driver will convert this to the BLOB value that the Blob object represents before sending it to the database.
Parameters
ithe first parameter is 1, the second is 2, ...
xan object representing a BLOB
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java boolean value. The driver converts this to an SQL BIT value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java byte value. The driver converts this to an SQL TINYINT value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java array of byte values. Before sending it to the database, the driver converts this to an SQL VARBINARY or LONGVARBINARY value, depending on the argument's size relative to the driver's limits on VARBINARY values.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.io.Reader value. It may be more practical to send a very large UNICODE value via a java.io.Reader rather than as a LONGVARCHAR parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
readerthe Reader object that contains the UNICODE data to be set
lengththe number of characters in the stream
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given Clob value. The driver will convert this to the CLOB value that the Clob object represents before sending it to the database.
Parameters
ithe first parameter is 1, the second is 2, ...
xan object representing a CLOB
Throws
SQLExceptionif a database access error occurs
Sets this RowSet object's command property to the given SQL query. This property is optional when a rowset gets its data from a data source that does not support commands, such as a spreadsheet.
Parameters
cmdthe SQL query that will be used to get the data for this RowSet object; may be null
Throws
SQLExceptionif a database access error occurs
See Also
Sets the concurrency of this RowSet object to the given concurrency level. This method is used to change the concurrency level of a rowset, which is by default ResultSet.CONCUR_READ_ONLY
Parameters
concurrencyone of the ResultSet constants specifying a concurrency level: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Throws
SQLExceptionif a database access error occurs
Sets the data source name property for this RowSet object to the given String.

The value of the data source name property can be used to do a lookup of a DataSource object that has been registered with a naming service. After being retrieved, the DataSource object can be used to create a connection to the data source that it represents.

Parameters
namethe logical name of the data source for this RowSet object
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.sql.Date value. The driver converts this to an SQL DATE value before sending it to the database, using the default java.util.Calendar to calculate the date.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given java.sql.Date value. The driver will convert this to an SQL DATE value, using the given java.util.Calendar object to calculate the date.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
calthe java.util.Calendar object to use for calculating the date
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java double value. The driver converts this to an SQL DOUBLE value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets escape processing for this RowSet object on or off. If escape scanning is on (the default), the driver will do escape substitution before sending an SQL statement to the database.
Parameters
enabletrue to enable escape processing; false to disable it
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java float value. The driver converts this to an SQL REAL value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java int value. The driver converts this to an SQL INTEGER value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java long value. The driver converts this to an SQL BIGINT value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated column as the match column for this RowSet object. A JoinRowSet object can now add this RowSet object based on the match column.

Sub-interfaces such as the CachedRowSetTM interface define the method CachedRowSet.setKeyColumns, which allows primary key semantics to be enforced on specific columns. Implementations of the setMatchColumn(int columnIdx) method should ensure that the constraints on the key columns are maintained when a CachedRowSet object sets a primary key column as a match column.

Parameters
columnIdxan int identifying the index of the column to be set as the match column
Throws
SQLExceptionif an invalid column index is set
Sets the designated columns as the match column for this RowSet object. A JoinRowSet object can now add this RowSet object based on the match column.
Parameters
columnIdxesan array of int identifying the indexes of the columns to be set as the match columns
Throws
SQLExceptionif an invalid column index is set
Sets the designated column as the match column for this RowSet object. A JoinRowSet object can now add this RowSet object based on the match column.

Subinterfaces such as the CachedRowSet interface define the method CachedRowSet.setKeyColumns, which allows primary key semantics to be enforced on specific columns. Implementations of the setMatchColumn(String columnIdx) method should ensure that the constraints on the key columns are maintained when a CachedRowSet object sets a primary key column as a match column.

Parameters
columnNamea String object giving the name of the column to be set as the match column
Throws
SQLExceptionif an invalid column name is set, the column name is a null, or the column name is an empty string
Sets the designated columns as the match column for this RowSet object. A JoinRowSet object can now add this RowSet object based on the match column.
Parameters
columnNamesan array of String objects giving the names of the column to be set as the match columns
Throws
SQLExceptionif an invalid column name is set, the column name is a null, or the column name is an empty string
Sets the maximum number of bytes that can be returned for a column value to the given number of bytes. This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.
Parameters
maxthe new max column size limit in bytes; zero means unlimited
Throws
SQLExceptionif a database access error occurs
Sets the maximum number of rows that this RowSet object can contain to the specified number. If the limit is exceeded, the excess rows are silently dropped.
Parameters
maxthe new maximum number of rows; zero means unlimited
Throws
SQLExceptionif a database access error occurs
See Also
Sets the designated parameter in this RowSet object's SQL command to SQL NULL.

Note: You must specify the parameter's SQL type.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
sqlTypea SQL type code defined by java.sql.Types
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's SQL command to SQL NULL. This version of the method setNull should be used for SQL user-defined types (UDTs) and REF type parameters. Examples of UDTs include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

Note: To be portable, applications must give the SQL type code and the fully qualified SQL type name when specifying a NULL UDT or REF parameter. In the case of a UDT, the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for UDT and REF parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the typeName parameter is ignored.

Parameters
paramIndexthe first parameter is 1, the second is 2, ...
sqlTypea value from java.sql.Types
typeNamethe fully qualified name of an SQL UDT or the type name of the SQL structured type being referenced by a REF type; ignored if the parameter is not a UDT or REF type
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used.

The JDBC specification provides a standard mapping from Java Object types to SQL types. The driver will convert the given Java object to its standard SQL mapping before sending it to the database.

Note that this method may be used to pass datatabase-specific abstract data types by using a driver-specific Java type. If the object is of a class implementing SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If the object is an instance of a class implementing the Ref, Struct, Array, Blob, or Clob interfaces, the driver uses the default mapping to the corresponding SQL type.

An exception is thrown if there is an ambiguity, for example, if the object is of a class implementing more than one of these interfaces.

Parameters
parameterIndexThe first parameter is 1, the second is 2, ...
xThe object containing the input parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used. This method is like setObject above, but the scale used is the scale of the second parameter. Scalar values have a scale of zero. Literal values have the scale present in the literal.

Even though it is supported, it is not recommended that this method be called with floating point input values.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe object containing the input parameter value
targetSqlTypethe SQL type (as defined in java.sql.Types) to be sent to the database
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given Java Object. For integral values, the java.lang equivalent objects should be used (for example, an instance of the class Integer for an int).

The given Java object will be converted to the targetSqlType before being sent to the database.

If the object is of a class implementing SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If the object is an instance of a class implementing the Ref, Struct, Array, Blob, or Clob interfaces, the driver uses the default mapping to the corresponding SQL type.

Note that this method may be used to pass datatabase-specific abstract data types.

Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe object containing the input parameter value
targetSqlTypethe SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
scalefor java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
Throws
SQLExceptionif a database access error occurs
Sets the database password for this RowSet object to the given String.
Parameters
passwordthe password string
Throws
SQLExceptionif a database access error occurs
See Also
Sets the maximum time the driver will wait for a statement to execute to the given number of seconds. If this limit is exceeded, an SQLException is thrown.
Parameters
secondsthe new query timeout limit in seconds; zero means that there is no limit
Throws
SQLExceptionif a database access error occurs
Sets whether this RowSet object is read-only to the given boolean.
Parameters
valuetrue if read-only; false if updatable
Throws
SQLExceptionif a database access error occurs
See Also
Sets the designated parameter in this RowSet object's command with the given Ref value. The driver will convert this to the appropriate REF(<structured-type>) value.
Parameters
ithe first parameter is 1, the second is 2, ...
xan object representing data of an SQL REF type
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given Java short value. The driver converts this to an SQL SMALLINT value before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the property 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
btrue if deleted rows should be shown; false otherwise
Throws
SQLExceptionif a rowset implementation is unable to to reset whether deleted rows should be visible
Sets the designated parameter in this RowSet object's command to the given Java String value. Before sending it to the database, the driver converts this to an SQL VARCHAR or LONGVARCHAR value, depending on the argument's size relative to the driver's limits on VARCHAR values.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.sql.Time value. The driver converts this to an SQL TIME value before sending it to the database, using the default java.util.Calendar to calculate it.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given java.sql.Time value. The driver will convert this to an SQL TIME value, using the given java.util.Calendar object to calculate it, before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
calthe java.util.Calendar object to use for calculating the time
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value before sending it to the database, using the default java.util.Calendar to calculate it.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
Throws
SQLExceptionif a database access error occurs
Sets the designated parameter in this RowSet object's command with the given java.sql.Timestamp value. The driver will convert this to an SQL TIMESTAMP value, using the given java.util.Calendar object to calculate it, before sending it to the database.
Parameters
parameterIndexthe first parameter is 1, the second is 2, ...
xthe parameter value
calthe java.util.Calendar object to use for calculating the timestamp
Throws
SQLExceptionif a database access error occurs
Sets the transaction isolation level for this RowSet obejct.
Parameters
levelthe transaction isolation level; one of Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE
Throws
SQLExceptionif a database access error occurs
Sets the type of this RowSet object to the given type. This method is used to change the type of a rowset, which is by default read-only and non-scrollable.
Parameters
typeone of the ResultSet constants specifying a type: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
Throws
SQLExceptionif a database access error occurs
Installs the given java.util.Map object as the default type map for this RowSet object. This type map will be used unless another type map is supplied as a method parameter.
Parameters
mapa java.util.Map object containing the names of SQL user-defined types and the Java classes to which they are to be mapped
Throws
SQLExceptionif a database access error occurs
See Also
Sets the URL this RowSet object will use when it uses the DriverManager to create a connection. Setting this property is optional. If a URL is used, a JDBC driver that accepts the URL must be loaded by the application before the rowset is used to connect to a database. The rowset will use the URL internally to create a database connection when reading or writing data. Either a URL or a data source name is used to create a connection, whichever was specified most recently.
Parameters
urla string value; may be null
Throws
SQLExceptionif a database access error occurs
See Also
Sets the username property for this RowSet object to the given String.
Parameters
namea user name
Throws
SQLExceptionif a database access error occurs
See Also
Unsets the designated column as the match column for this RowSet object.

RowSet objects that implement the Joinable interface must ensure that a key-like constraint continues to be enforced until the method CachedRowSet.unsetKeyColumns has been called on the designated column.

Parameters
columnIdxan int that identifies the index of the column that is to be unset as a match column
Throws
SQLExceptionif an invalid column index is designated or if the designated column was not previously set as a match column
Unsets the designated columns as the match column for this RowSet object.
Parameters
columnIdxesan arrary of int that identifies the indexes of the columns that are to be unset as match columns
Throws
SQLExceptionif an invalid column index is designated or if the designated column was not previously set as a match column
Unsets the designated column as the match column for this RowSet object.

RowSet objects that implement the Joinable interface must ensure that a key-like constraint continues to be enforced until the method CachedRowSet.unsetKeyColumns has been called on the designated column.

Parameters
columnNamea String object giving the name of the column that is to be unset as a match column
Throws
SQLExceptionif an invalid column name is designated or the designated column was not previously set as a match column
Unsets the designated columns as the match columns for this RowSet object.
Parameters
columnNamean array of String objects giving the names of the columns that are to be unset as the match columns
Throws
SQLExceptionif an invalid column name is designated or the designated column was not previously set as a match column