Build 1.0_r1(from source)

javax.sql
Interface RowSet

All Superinterfaces:
ResultSet

public interface RowSet
extends ResultSet

A RowSet is an interface which provides access to data being sent from/to a database and which extends the functionality of ResultSet into a form that can be used as a JavaBeans component, perhaps being used in a visual programming environment.

Facilities are provided for get/set of properties relating to the Database and the SQL Command and for getting/setting data within the Rows represented by the RowSet. The RowSet supports JavaBeans events so that other components in an application can be informed when various changes happen to the RowSet, such as changes in data values.

RowSet is implemented as a layer on top of the remainder of the JDBC API. A RowSet may be connected where it maintains a connection to the database throughout its lifecycle. A RowSet may be disconnected where it establishes a connection to the database, gets data and then closes the connection. Updates to a disconnected RowSet can be made and later send back the changes to the database, but this requires the RowSet to first reconnect to the database before the changes are sent back.

Disconnected RowSets may make use of RowSetReaders to populate the RowSet with data, possibly from a non-relational database source. Disconnected RowSets may also use RowSetWriters to send data back to the underlying data store. There is considerable freedom in the way that RowSetReaders and RowSetWriters are implemented to get and store data.


Field Summary
 
Fields inherited from interface java.sql.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
 
Method Summary
 void addRowSetListener(RowSetListener theListener)
          Registers a supplied RowSetListener with this RowSet.
 void clearParameters()
          Clears the parameters previously set for this RowSet.
 void execute()
          Fetches data for this RowSet.
 String getCommand()
          Gets the RowSet's Command property.
 String getDataSourceName()
          Gets the name of the datasource for this RowSet.
 boolean getEscapeProcessing()
          Reports if escape processing is enabled for this RowSet.
 int getMaxFieldSize()
          Gets the maximum number of bytes that can be returned for column values which are of types BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR.
 int getMaxRows()
          Gets the maximum number of rows for this RowSet.
 String getPassword()
          Gets the value of the password property for this RowSet.
 int getQueryTimeout()
          Gets the Timeout for the driver when executing a Query operation.
 int getTransactionIsolation()
          Gets the transaction isolation property setting for this RowSet.
 Map<String,Class<?>> getTypeMap()
          Gets the custom mapping of SQL types for this RowSet, if any.
 String getUrl()
          Gets the URL property value for this RowSet.
 String getUsername()
          Gets the value of the Username property for this RowSet.
 boolean isReadOnly()
          Reports if this RowSet is read only.
 void removeRowSetListener(RowSetListener theListener)
          Removes a specified RowSetListener object from the set of listeners which will be notified of events by this RowSet.
 void setArray(int parameterIndex, Array theArray)
          Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.
 void setAsciiStream(int parameterIndex, InputStream theInputStream, int length)
          Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value.
 void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
          Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value.
 void setBinaryStream(int parameterIndex, InputStream theInputStream, int length)
          Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value.
 void setBlob(int parameterIndex, Blob theBlob)
          Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.
 void setBoolean(int parameterIndex, boolean theBoolean)
          Sets the value of the specified parameter in the RowSet command to the supplied boolean.
 void setByte(int parameterIndex, byte theByte)
          Sets the value of the specified parameter in the RowSet command to the supplied byte value.
 void setBytes(int parameterIndex, byte[] theByteArray)
          Sets the value of the specified parameter in the RowSet command to the supplied byte array value.
 void setCharacterStream(int parameterIndex, Reader theReader, int length)
          Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.
 void setClob(int parameterIndex, Clob theClob)
          Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.
 void setCommand(String cmd)
          Sets the Command property for this RowSet - the command is an SQL Query which runs when the execute method is invoked.
 void setConcurrency(int concurrency)
          Sets the concurrency property of this RowSet.
 void setDataSourceName(String name)
          Sets the Data Source Name property for the RowSet.
 void setDate(int parameterIndex, Date theDate)
          Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date.
 void setDate(int parameterIndex, Date theDate, Calendar theCalendar)
          Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date, where the conversion of the Date to an SQL DATE value is calculated using a supplied Calendar.
 void setDouble(int parameterIndex, double theDouble)
          Sets the value of the specified parameter in the RowSet command with the supplied double.
 void setEscapeProcessing(boolean enable)
          Sets the Escape Processing status for this RowSet.
 void setFloat(int parameterIndex, float theFloat)
          Sets the value of the specified parameter in the RowSet command with the supplied float.
 void setInt(int parameterIndex, int theInteger)
          Sets the value of the specified parameter in the RowSet command with the supplied integer.
 void setLong(int parameterIndex, long theLong)
          Sets the value of the specified parameter in the RowSet command with the supplied long.
 void setMaxFieldSize(int max)
          Sets the maximum number of bytes which can be returned for a column value where the column type BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR.
 void setMaxRows(int max)
          Sets the maximum number of rows which can be held by the RowSet.
 void setNull(int parameterIndex, int sqlType)
          Sets the value of the specified parameter in the RowSet command to SQL NULL.
 void setNull(int parameterIndex, int sqlType, String typeName)
          Sets the value of the specified parameter in the RowSet command to SQL NULL.
 void setObject(int parameterIndex, Object theObject)
          Sets the value of the specified parameter in the RowSet command to a supplied Java object.
 void setObject(int parameterIndex, Object theObject, int targetSqlType)
          Sets the value of the specified parameter in the RowSet command to a supplied Java object.
 void setObject(int parameterIndex, Object theObject, int targetSqlType, int scale)
          Sets the value of the specified parameter in the RowSet command to a supplied Java object.
 void setPassword(String password)
          Sets the database Password for this RowSet.
 void setQueryTimeout(int seconds)
          Sets the Timeout value for this RowSet.
 void setReadOnly(boolean readOnly)
          Sets whether the RowSet is read only or is updateable.
 void setRef(int parameterIndex, Ref theRef)
          Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Ref.
 void setShort(int parameterIndex, short theShort)
          Sets the value of the specified parameter in the RowSet command to a supplied short integer.
 void setString(int parameterIndex, String theString)
          Sets the value of the specified parameter in the RowSet command to a supplied String.
 void setTime(int parameterIndex, Time theTime)
          Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using the system default Calendar.
 void setTime(int parameterIndex, Time theTime, Calendar theCalendar)
          Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using a supplied Calendar.
 void setTimestamp(int parameterIndex, Timestamp theTimestamp)
          Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp, converting to an SQL TIMESTAMP value using the system default Calendar.
 void setTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar)
          Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp converting to an SQL TIMESTAMP value using a supplied Calendar.
 void setTransactionIsolation(int level)
          Updates the target instance's transaction isolation level to one of a discrete set of possible values.
 void setType(int type)
          Sets the type of this RowSet.
 void setTypeMap(Map<String,Class<?>> theTypeMap)
          Sets the Map used to map SQL User Defined Types to Java classes.
 void setUrl(String theURL)
          Sets the URL used by this RowSet to access the database via a DriverManager.
 void setUsername(String theUsername)
          Sets the Username property for the RowSet, used to authenticate a connection to the database.
 
Methods inherited from interface java.sql.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, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 

Method Detail

addRowSetListener

void addRowSetListener(RowSetListener theListener)
Registers a supplied RowSetListener with this RowSet. Once registered, the RowSetListener is notified of events generated by the RowSet.

Parameters:
theListener - an object which implements the rowSetListener interface.

clearParameters

void clearParameters()
                     throws SQLException
Clears the parameters previously set for this RowSet.

Parameter values apply to repeated use of a RowSet object. Setting a new value for a parameter clears its previous value. clearParameters clears the values for all parameters with one method call.

Throws:
SQLException - if a problem occurs accessing the database

execute

void execute()
             throws SQLException
Fetches data for this RowSet. If successful, any existing data for the RowSet is discarded and the metadata for the rowset is set.

Data is retrieved connects to the database and executes a Command. This requires some or all of the following properties to be set: url, data source name, user name, password, transaction isolation, type map ; plus some or all of the properties: command, read only, maximum field size, maximum rows, escape processing, and query timeout.

The RowSet may use a RowSetReader to access the database - in this case a reader must be registered with the RowSet and the RowSet will then invoke the readData method on the reader to fetch the data.

Throws:
SQLException - if a problem occurs accessing the database or if the properties needed to access the database have not been set

getCommand

String getCommand()
Gets the RowSet's Command property.

Returns:
a string containing the RowSet's Command property - this is an SQL Query which can be executed to fetch data into the RowSet.

getDataSourceName

String getDataSourceName()
Gets the name of the datasource for this RowSet.

Returns:
a String containing the name of the datasource.

getEscapeProcessing

boolean getEscapeProcessing()
                            throws SQLException
Reports if escape processing is enabled for this RowSet.

If true (the default) the driver will automatically perform escape code processing on SQL statements prior to them being sent to the database.

Returns:
true if escape processing is enabled, false otherwise.
Throws:
SQLException - if a problem occurs accessing the database

getMaxFieldSize

int getMaxFieldSize()
                    throws SQLException
Gets the maximum number of bytes that can be returned for column values which are of types BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR. Excess data is silently discarded if the number is exceeded.

Returns:
the current maximum size in bytes. 0 means no limit
Throws:
SQLException - if a problem occurs accessing the database

getMaxRows

int getMaxRows()
               throws SQLException
Gets the maximum number of rows for this RowSet. Excess rows are discarded silently if the limit is exceeded.

Returns:
the previous maximum number of rows. 0 implies no limit.
Throws:
SQLException - if a problem occurs accessing the database

getPassword

String getPassword()
Gets the value of the password property for this RowSet. This property is used when making a connection to the database and should be set before invoking the execute method.

Returns:
a String containing the value of the password property.

getQueryTimeout

int getQueryTimeout()
                    throws SQLException
Gets the Timeout for the driver when executing a Query operation.

If a Query takes longer than the Timeout, an exception is thrown.

Returns:
the Timeout value in seconds.
Throws:
SQLException - if an error occurs accessing the database.

getTransactionIsolation

int getTransactionIsolation()
Gets the transaction isolation property setting for this RowSet.

Returns:
an integer holding the current transaction isolation setting. One of: one of Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, Connection.TRANSACTION_SERIALIZABLE

getTypeMap

Map<String,Class<?>> getTypeMap()
                                throws SQLException
Gets the custom mapping of SQL types for this RowSet, if any.

Returns:
a Map holding the custom mappings of SQL types to Java classes for this RowSet. By default, the Map is empty.
Throws:
SQLException - if an error occurs accessing the database.

getUrl

String getUrl()
              throws SQLException
Gets the URL property value for this RowSet. If there is no DataSource object specified, the RowSet uses the URL to establish a connection to the database. The default value for the URL is null.

Returns:
a String holding the value of the URL property.
Throws:
SQLException - if an error occurs accessing the database.

getUsername

String getUsername()
Gets the value of the Username property for this RowSet. The Username is used when establishing a connection to the database and should be set before the execute method is invoked.

Returns:
a String holing the value of the Username property.

isReadOnly

boolean isReadOnly()
Reports if this RowSet is read only.

Returns:
true if this RowSet is read only, false if it is updateable.

removeRowSetListener

void removeRowSetListener(RowSetListener theListener)
Removes a specified RowSetListener object from the set of listeners which will be notified of events by this RowSet.

Parameters:
theListener - the RowSetListener to remove from the set of listeners for this RowSet.

setArray

void setArray(int parameterIndex,
              Array theArray)
              throws SQLException
Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theArray - the java.sql.Array value to set
Throws:
SQLException - if an error occurs accessing the database.

setAsciiStream

void setAsciiStream(int parameterIndex,
                    InputStream theInputStream,
                    int length)
                    throws SQLException
Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value. Data is read from the InputStream until end-of-file is reached.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theInputStream - an InputStream containing the ASCII data to set into the parameter value
length - the length of the data in bytes
Throws:
SQLException - if an error occurs accessing the database.

setBigDecimal

void setBigDecimal(int parameterIndex,
                   BigDecimal theBigDecimal)
                   throws SQLException
Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theBigDecimal - the BigDecimal containing the value
Throws:
SQLException - if an error occurs accessing the database.

setBinaryStream

void setBinaryStream(int parameterIndex,
                     InputStream theInputStream,
                     int length)
                     throws SQLException
Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value. Data is read from the InputStream until end-of-file is reached.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theInputStream - an InputStream containing the binary data to set into the parameter value
length - the length of the data in bytes
Throws:
SQLException - if an error occurs accessing the database.

setBlob

void setBlob(int parameterIndex,
             Blob theBlob)
             throws SQLException
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theBlob - the Blob value to set
Throws:
SQLException - if an error occurs accessing the database.

setBoolean

void setBoolean(int parameterIndex,
                boolean theBoolean)
                throws SQLException
Sets the value of the specified parameter in the RowSet command to the supplied boolean.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theBoolean - the boolean value to set
Throws:
SQLException - if an error occurs accessing the database.

setByte

void setByte(int parameterIndex,
             byte theByte)
             throws SQLException
Sets the value of the specified parameter in the RowSet command to the supplied byte value.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theByte - the byte value to set
Throws:
SQLException - if an error occurs accessing the database.

setBytes

void setBytes(int parameterIndex,
              byte[] theByteArray)
              throws SQLException
Sets the value of the specified parameter in the RowSet command to the supplied byte array value.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theByteArray - the array of bytes to set into the parameter.
Throws:
SQLException - if an error occurs accessing the database.

setCharacterStream

void setCharacterStream(int parameterIndex,
                        Reader theReader,
                        int length)
                        throws SQLException
Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theReader - the Reader which contains the Unicode data to set into the parameter
length - the length of the data in the Reader in characters
Throws:
SQLException - if an error occurs accessing the database.

setClob

void setClob(int parameterIndex,
             Clob theClob)
             throws SQLException
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theClob - the Clob value to set
Throws:
SQLException - if an error occurs accessing the database.

setCommand

void setCommand(String cmd)
                throws SQLException
Sets the Command property for this RowSet - the command is an SQL Query which runs when the execute method is invoked. This property is optional for datasources that do not support commands.

Parameters:
cmd - a String containing the SQL Query. Can be null.
Throws:
SQLException - if an error occurs accessing the database.

setConcurrency

void setConcurrency(int concurrency)
                    throws SQLException
Sets the concurrency property of this RowSet. The default value is ResultSet.CONCUR_READ_ONLY.

Parameters:
concurrency - the new concurrency value - one of: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Throws:
SQLException - if an error occurs accessing the database.

setDataSourceName

void setDataSourceName(String name)
                       throws SQLException
Sets the Data Source Name property for the RowSet.

The Data Source Name can be used to find a DataSource which has been registered with a naming service - the DataSource can then be used to create a connection to the database.

Parameters:
name - a String with the new Data Source Name.
Throws:
SQLException - if an error occurs accessing the database.

setDate

void setDate(int parameterIndex,
             Date theDate)
             throws SQLException
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theDate - the Date to use
Throws:
SQLException - if an error occurs accessing the database.

setDate

void setDate(int parameterIndex,
             Date theDate,
             Calendar theCalendar)
             throws SQLException
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date, where the conversion of the Date to an SQL DATE value is calculated using a supplied Calendar.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theDate - the Date to use
theCalendar - the Calendar to use in converting the Date to an SQL DATE value
Throws:
SQLException - if an error occurs accessing the database.

setDouble

void setDouble(int parameterIndex,
               double theDouble)
               throws SQLException
Sets the value of the specified parameter in the RowSet command with the supplied double.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theDouble - the double value to set
Throws:
SQLException - if an error occurs accessing the database.

setEscapeProcessing

void setEscapeProcessing(boolean enable)
                         throws SQLException
Sets the Escape Processing status for this RowSet. If escape processing is on, the driver performs escape substitution before sending an SQL command to the database. The default value for escape processing is on.

Parameters:
enable - true to enable Escape Processing, false to turn it off.
Throws:
SQLException - if an error occurs accessing the database.

setFloat

void setFloat(int parameterIndex,
              float theFloat)
              throws SQLException
Sets the value of the specified parameter in the RowSet command with the supplied float.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theFloat - the float value to set
Throws:
SQLException - if an error occurs accessing the database.

setInt

void setInt(int parameterIndex,
            int theInteger)
            throws SQLException
Sets the value of the specified parameter in the RowSet command with the supplied integer.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theInteger - the integer value to set
Throws:
SQLException - if an error occurs accessing the database.

setLong

void setLong(int parameterIndex,
             long theLong)
             throws SQLException
Sets the value of the specified parameter in the RowSet command with the supplied long.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theLong - the long value to set
Throws:
SQLException - if an error occurs accessing the database.

setMaxFieldSize

void setMaxFieldSize(int max)
                     throws SQLException
Sets the maximum number of bytes which can be returned for a column value where the column type BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR. Data which exceeds this limit is silently discarded. For portability, a value greater than 256 is recommended.

Parameters:
max - the maximum size of the returned column value in bytes. 0 means unlimited.
Throws:
SQLException - if an error occurs accessing the database.

setMaxRows

void setMaxRows(int max)
                throws SQLException
Sets the maximum number of rows which can be held by the RowSet. Any additional rows are silently discarded.

Parameters:
max - the maximum number of rows which can be held in the RowSet. 0 means no limit.
Throws:
SQLException - if an error occurs accessing the database.

setNull

void setNull(int parameterIndex,
             int sqlType)
             throws SQLException
Sets the value of the specified parameter in the RowSet command to SQL NULL.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
sqlType - the type of the parameter, as defined by java.sql.Types.
Throws:
SQLException - if an error occurs accessing the database.

setNull

void setNull(int parameterIndex,
             int sqlType,
             String typeName)
             throws SQLException
Sets the value of the specified parameter in the RowSet command to SQL NULL. This form of the setNull method should be used for User Defined Types and REF parameters.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
sqlType - the type of the parameter, as defined by java.sql.Types.
typeName - the fully qualified name of an SQL User Defined Type or the name of the SQL structured type referenced by a REF type. Ignored if the sqlType is not a UDT or REF type.
Throws:
SQLException - if an error occurs accessing the database.

setObject

void setObject(int parameterIndex,
               Object theObject)
               throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied Java object.

The JDBC specification provides a standard mapping for Java objects to SQL data types. Database specific types can be mapped by JDBC driver specific Java types.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theObject - the Java object containing the data value.
Throws:
SQLException - if an error occurs accessing the database.

setObject

void setObject(int parameterIndex,
               Object theObject,
               int targetSqlType)
               throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theObject - the Java object containing the data value.
targetSqlType - the SQL type to send to the database, as defined in java.sql.Types.
Throws:
SQLException - if an error occurs accessing the database.

setObject

void setObject(int parameterIndex,
               Object theObject,
               int targetSqlType,
               int scale)
               throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theObject - the Java object containing the data value.
targetSqlType - the SQL type to send to the database, as defined in java.sql.Types.
scale - the number of digits after the decimal point, for java.sql.Types.DECIMAL and java.sql.Types.NUMERIC types. Ignored for all other types.
Throws:
SQLException - if an error occurs accessing the database.

setPassword

void setPassword(String password)
                 throws SQLException
Sets the database Password for this RowSet.

Parameters:
password - a string holding the new password
Throws:
SQLException - if an error occurs accessing the database.

setQueryTimeout

void setQueryTimeout(int seconds)
                     throws SQLException
Sets the Timeout value for this RowSet. The timeout is the maximum time that the driver will wait while executing a command - after this time, an SQLException is thrown.

Parameters:
seconds - the number of seconds for the Timeout.
Throws:
SQLException - if an error occurs accessing the database.

setReadOnly

void setReadOnly(boolean readOnly)
                 throws SQLException
Sets whether the RowSet is read only or is updateable.

Parameters:
readOnly - true to set the RowSet to readonly state, false to allow updates.
Throws:
SQLException - if an error occurs accessing the database.

setRef

void setRef(int parameterIndex,
            Ref theRef)
            throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Ref. This is sent to the database as an SQL REF value.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theRef - the Ref value to set
Throws:
SQLException - if an error occurs accessing the database.

setShort

void setShort(int parameterIndex,
              short theShort)
              throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied short integer.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theShort - the short value to set
Throws:
SQLException - if an error occurs accessing the database.

setString

void setString(int parameterIndex,
               String theString)
               throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied String. The String is placed into the database as a VARCHAR or LONGVARCHAR SQL value, depending on the database limits for the length of VARCHAR values.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theString -
Throws:
SQLException - if an error occurs accessing the database.

setTime

void setTime(int parameterIndex,
             Time theTime)
             throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using the system default Calendar.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theTime - the Time value to set
Throws:
SQLException - if an error occurs accessing the database.

setTime

void setTime(int parameterIndex,
             Time theTime,
             Calendar theCalendar)
             throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using a supplied Calendar.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theTime - the Time value to set
theCalendar - the Calendar to use in the conversion operation
Throws:
SQLException - if an error occurs accessing the database.

setTimestamp

void setTimestamp(int parameterIndex,
                  Timestamp theTimestamp)
                  throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp, converting to an SQL TIMESTAMP value using the system default Calendar.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theTimestamp -
Throws:
SQLException - if an error occurs accessing the database.

setTimestamp

void setTimestamp(int parameterIndex,
                  Timestamp theTimestamp,
                  Calendar theCalendar)
                  throws SQLException
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp converting to an SQL TIMESTAMP value using a supplied Calendar.

Parameters:
parameterIndex - index of the parameter to set, where the first parameter has index = 1.
theTimestamp -
theCalendar - the Calendar to use in the conversion operation
Throws:
SQLException - if an error occurs accessing the database.

setTransactionIsolation

void setTransactionIsolation(int level)
                             throws SQLException
Updates the target instance's transaction isolation level to one of a discrete set of possible values.

Parameters:
level - the new transaction isolation level. One of: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE
Throws:
SQLException - if an error occurs accessing the database.

setType

void setType(int type)
             throws SQLException
Sets the type of this RowSet. By default, the type is non-scrollable.

Parameters:
type - the new type for the RowSet. One of: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
Throws:
SQLException - if an error occurs accessing the database.

setTypeMap

void setTypeMap(Map<String,Class<?>> theTypeMap)
                throws SQLException
Sets the Map used to map SQL User Defined Types to Java classes.

Parameters:
theTypeMap - a Map which defines the names of SQL UDTs and the Java classes to which they are mapped.
Throws:
SQLException - if an error occurs accessing the database.

setUrl

void setUrl(String theURL)
            throws SQLException
Sets the URL used by this RowSet to access the database via a DriverManager. The URL is optional - an alternative is to use a Data Source Name to create a connection.

Parameters:
theURL - a String containing the URL for the database. Can be null.
Throws:
SQLException - if an error occurs accessing the database.

setUsername

void setUsername(String theUsername)
                 throws SQLException
Sets the Username property for the RowSet, used to authenticate a connection to the database.

Parameters:
theUsername - a String containing the User Name
Throws:
SQLException - if an error occurs accessing the database.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature