Android
javax.sql
public interface

javax.sql.RowSet

javax.sql.RowSet 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.

Summary

Constants inherited from interface java.sql.ResultSet

Public Methods

          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<StringClass<?>>  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, 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  setObject(int parameterIndex, Object theObject)
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, 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  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  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  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  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<StringClass<?>> 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

Details

Public Methods

public 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.

public void clearParameters()

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

public void execute()

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

public 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.

public String getDataSourceName()

Gets the name of the datasource for this RowSet.

Returns

  • a String containing the name of the datasource.

public boolean getEscapeProcessing()

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

public 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. 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

public int getMaxRows()

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

public 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.

public int getQueryTimeout()

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.

public 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

public Map<StringClass<?>> getTypeMap()

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.

public String getUrl()

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.

public 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.

public boolean isReadOnly()

Reports if this RowSet is read only.

Returns

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

public 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.

public void setArray(int parameterIndex, Array theArray)

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.

public 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. 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.

public 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.

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.

public 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. 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.

public 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.

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.

public void setBoolean(int parameterIndex, boolean theBoolean)

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.

public void setByte(int parameterIndex, byte theByte)

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.

public void setBytes(int parameterIndex, byte[] theByteArray)

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.

public 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.

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.

public 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.

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.

public 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. 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.

public void setConcurrency(int concurrency)

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.

public void setDataSourceName(String name)

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.

public 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.

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.

public 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.

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.

public void setDouble(int parameterIndex, double theDouble)

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.

public void setEscapeProcessing(boolean enable)

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.

public void setFloat(int parameterIndex, float theFloat)

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.

public void setInt(int parameterIndex, int theInteger)

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.

public void setLong(int parameterIndex, long theLong)

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.

public 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. 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.

public void setMaxRows(int max)

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.

public void setNull(int parameterIndex, int sqlType)

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.

public void setNull(int parameterIndex, int sqlType, String typeName)

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.

public void setObject(int parameterIndex, Object theObject, int targetSqlType)

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.

public 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.

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.

public void setObject(int parameterIndex, Object theObject)

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.

public void setPassword(String password)

Sets the database Password for this RowSet.

Parameters

password a string holding the new password

Throws

SQLException if an error occurs accessing the database.

public void setQueryTimeout(int seconds)

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.

public void setReadOnly(boolean readOnly)

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.

public void setRef(int parameterIndex, Ref theRef)

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.

public void setShort(int parameterIndex, short theShort)

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.

public void setString(int parameterIndex, String theString)

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.

Throws

SQLException if an error occurs accessing the database.

public 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.

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.

public 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.

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.

public 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.

Parameters

parameterIndex index of the parameter to set, where the first parameter has index = 1.
theCalendar the Calendar to use in the conversion operation

Throws

SQLException if an error occurs accessing the database.

public 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.

Parameters

parameterIndex index of the parameter to set, where the first parameter has index = 1.

Throws

SQLException if an error occurs accessing the database.

public void setTransactionIsolation(int level)

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.

public void setType(int type)

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.

public void setTypeMap(Map<StringClass<?>> theTypeMap)

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.

public void setUrl(String theURL)

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.

public void setUsername(String theUsername)

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.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48