Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

RowSet

implements ResultSet
javax.sql.RowSet

Class Overview

An interface which provides means to access data which persists on a database. It extends the functionality of ResultSet into a form that it can be used as a JavaBean component, suited for a visual programming environment.

RowSet provides getters and setters for properties relating to the general database environment together with the getters and setters for distinct data values which constitute the row set. The RowSet class supports JavaBean events so that other components in an application can be informed when changes happen such as changes in data values.

RowSet is a facility implemented on top of the remainder of the JDBC API. It may be connected , maintaining a connection to the database throughout its lifecycle. The changes made on a disconnected RowSet on the other hand can be persisted only establishing a new connection with the database each time.

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

Summary

[Expand]
Inherited Constants
From interface java.sql.ResultSet
Public Methods
abstract void addRowSetListener ( RowSetListener theListener)
Registers the supplied RowSetListener with this RowSet .
abstract void clearParameters ()
Clears the parameters previously set for this RowSet .
abstract void execute ()
Fetches data for this RowSet from the database.
abstract String getCommand ()
Gets the RowSet 's command property.
abstract String getDataSourceName ()
Gets the ODBC Data Source Name property associated with this RowSet .
abstract boolean getEscapeProcessing ()
Reports if escape processing is enabled for this RowSet .
abstract int getMaxFieldSize ()
Gets the maximum number of bytes that can be returned for column values which are of type BINARY , VARBINARY , LONGVARBINARYBINARY , CHAR , VARCHAR , or LONGVARCHAR .
abstract int getMaxRows ()
Gets the maximum number of rows for this RowSet .
abstract String getPassword ()
Gets the value of the password property for this RowSet .
abstract int getQueryTimeout ()
Gets the timeout for the driver when a query operation is executed.
abstract int getTransactionIsolation ()
Gets the transaction isolation level property set for this RowSet .
abstract Map < String Class <?>> getTypeMap ()
Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes for this RowSet , if applicable.
abstract String getUrl ()
Gets the URL property value for this RowSet .
abstract String getUsername ()
Gets the value of the username property for this RowSet .
abstract boolean isReadOnly ()
Indicates if this RowSet is read-only.
abstract void removeRowSetListener ( RowSetListener theListener)
Removes a specified RowSetListener object from the set of listeners which will be notified of events by this RowSet .
abstract void setArray (int parameterIndex, Array theArray)
Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.
abstract 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.
abstract void setAsciiStream ( String parameterName, 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.
abstract void setAsciiStream ( String parameterName, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value.
abstract void setAsciiStream (int parameterIndex, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value.
abstract 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.
abstract void setBigDecimal ( String parameterName, 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.
abstract void setBinaryStream (int parameterIndex, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value.
abstract void setBinaryStream ( String parameterName, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value.
abstract void setBinaryStream (int parameterIndex, InputStream theInputStream, int length)
Sets the value of the specified parameter in the RowSet command to the binary data in the supplied input stream.
abstract void setBinaryStream ( String parameterName, 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.
abstract void setBlob (int parameterIndex, InputStream theInputStream, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.
abstract void setBlob (int parameterIndex, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.
abstract void setBlob ( String parameterName, InputStream theInputStream, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.
abstract void setBlob ( String parameterName, InputStream theInputStream)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.
abstract void setBlob ( String parameterName, Blob theBlob)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.
abstract void setBlob (int parameterIndex, Blob theBlob)
Sets the value of the specified parameter in the RowSet command to the supplied Blob value.
abstract void setBoolean ( String parameterName, boolean theBoolean)
Sets the value of the specified parameter in the RowSet command to the supplied boolean.
abstract void setBoolean (int parameterIndex, boolean theBoolean)
Sets the value of the specified parameter in the RowSet command to the supplied boolean.
abstract void setByte (int parameterIndex, byte theByte)
Sets the value of the specified parameter in the RowSet command to the supplied byte value.
abstract void setByte ( String parameterName, byte theByte)
Sets the value of the specified parameter in the RowSet command to the supplied byte value.
abstract void setBytes (int parameterIndex, byte[] theByteArray)
Sets the value of the specified parameter in the RowSet command to the supplied byte array value.
abstract void setBytes ( String parameterName, byte[] theByteArray)
Sets the value of the specified parameter in the RowSet command to the supplied byte array value.
abstract void setCharacterStream ( String parameterName, 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.
abstract void setCharacterStream ( String parameterName, Reader theReader)
Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.
abstract void setCharacterStream (int parameterIndex, Reader theReader)
Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.
abstract 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 .
abstract void setClob (int parameterIndex, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setClob ( String parameterName, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract 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 .
abstract void setClob (int parameterIndex, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setClob ( String parameterName, Clob theClob)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.
abstract void setClob ( String parameterName, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract 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.
abstract void setConcurrency (int concurrency)
Sets the concurrency property of this RowSet .
abstract void setDataSourceName ( String name)
Sets the database name property for the RowSet .
abstract 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 .
abstract 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 .
abstract void setDate ( String parameterName, 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.
abstract void setDate ( String parameterName, Date theDate)
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.
abstract void setDouble (int parameterIndex, double theDouble)
Sets the value of the specified parameter in the RowSet command with the supplied double .
abstract void setDouble ( String parameterName, double theDouble)
Sets the value of the specified parameter in the RowSet command with the supplied double.
abstract void setEscapeProcessing (boolean enable)
Sets the escape processing status for this RowSet .
abstract void setFloat (int parameterIndex, float theFloat)
Sets the value of the specified parameter in the RowSet command with the supplied float .
abstract void setFloat ( String parameterName, float theFloat)
Sets the value of the specified parameter in the RowSet command with the supplied float.
abstract void setInt (int parameterIndex, int theInteger)
Sets the value of the specified parameter in the RowSet command with the supplied integer .
abstract void setInt ( String parameterName, int theInteger)
Sets the value of the specified parameter in the RowSet command with the supplied integer.
abstract void setLong (int parameterIndex, long theLong)
Sets the value of the specified parameter in the RowSet command with the supplied long .
abstract void setLong ( String parameterName, long theLong)
Sets the value of the specified parameter in the RowSet command with the supplied long.
abstract void setMaxFieldSize (int max)
Sets the maximum number of bytes which can be returned for a column value where the column type is one of BINARY , VARBINARY , LONGVARBINARYBINARY , CHAR , VARCHAR , or LONGVARCHAR .
abstract void setMaxRows (int max)
Sets the maximum number of rows which can be held by the RowSet .
abstract void setNCharacterStream (int parameterIndex, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNCharacterStream ( String parameterName, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNCharacterStream ( String parameterName, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNCharacterStream (int parameterIndex, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNClob ( String parameterName, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNClob ( String parameterName, NClob theNClob)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.
abstract void setNClob (int parameterIndex, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNClob ( String parameterName, Reader theReader)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNClob (int parameterIndex, NClob theNClob)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.
abstract void setNClob (int parameterIndex, Reader theReader, long length)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.
abstract void setNString ( String parameterName, String theNString)
Sets the value of the specified parameter in the RowSet command to the supplied NString.
abstract void setNString (int parameterIndex, String theNString)
Sets the value of the specified parameter in the RowSet command to the supplied NString
abstract void setNull ( String parameterName, int sqlType)
Sets the value of the specified parameter in the RowSet command to SQL NULL.
abstract void setNull ( String parameterName, int sqlType, String typeName)
Sets the value of the specified parameter in the RowSet command to SQL NULL.
abstract void setNull (int parameterIndex, int sqlType, String typeName)
Sets the value of the specified parameter in the RowSet command to SQL NULL .
abstract void setNull (int parameterIndex, int sqlType)
Sets the value of the specified parameter in the RowSet command to SQL NULL .
abstract void setObject ( String parameterName, Object theObject)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
abstract void setObject ( String parameterName, Object theObject, int targetSqlType)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
abstract void setObject ( String parameterName, Object theObject, int targetSqlType, int scale)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
abstract 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.
abstract void setObject (int parameterIndex, Object theObject)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
abstract void setObject (int parameterIndex, Object theObject, int targetSqlType)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
abstract void setPassword ( String password)
Sets the database Password for this RowSet .
abstract void setQueryTimeout (int seconds)
Gets the timeout for the driver when a query operation is executed.
abstract void setReadOnly (boolean readOnly)
Sets whether the RowSet is read-only or updatable.
abstract void setRef (int parameterIndex, Ref theRef)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Ref .
abstract void setRowId (int parameterIndex, RowId theRowId)
Sets the value of the specified parameter in the RowSet command to the supplied RowId
abstract void setRowId ( String parameterName, RowId theRowId)
Sets the value of the specified parameter in the RowSet command to the supplied RowId.
abstract void setSQLXML ( String parameterName, SQLXML theSQLXML)
Sets the value of the specified parameter in the RowSet command to the supplied SQLXML.
abstract void setSQLXML (int parameterIndex, SQLXML theSQLXML)
Sets the value of the specified parameter in the RowSet command to the supplied SQLXML
abstract void setShort (int parameterIndex, short theShort)
Sets the value of the specified parameter in the RowSet command to a supplied short integer .
abstract void setShort ( String parameterName, short theShort)
Sets the value of the specified parameter in the RowSet command to a supplied short integer.
abstract void setString (int parameterIndex, String theString)
Sets the value of the specified parameter in the RowSet command to a supplied String .
abstract void setString ( String parameterName, String theString)
Sets the value of the specified parameter in the RowSet command to a supplied String.
abstract void setTime (int parameterIndex, Time theTime)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time , converting it to an SQL TIME value using the system default Calendar .
abstract void setTime ( String parameterName, 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.
abstract 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 it to an SQL TIME value using a supplied Calendar .
abstract void setTime ( String parameterName, 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 a supplied Calendar.
abstract 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 it to an SQL TIMESTAMP value using a supplied Calendar .
abstract void setTimestamp ( String parameterName, 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.
abstract void setTimestamp ( String parameterName, 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 .
abstract void setTimestamp (int parameterIndex, Timestamp theTimestamp)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp , converting it to an SQL TIMESTAMP value using the system default Calendar .
abstract void setTransactionIsolation (int level)
Sets the target instance's transaction isolation level to one of a discrete set of possible values.
abstract void setType (int type)
Sets the type of this RowSet .
abstract void >)">setTypeMap ( Map < String Class <?>> theTypeMap)
Sets the mapping of SQL User Defined Types (UDTs) to Java classes.
abstract void setURL (int parameterIndex, URL theURL)
Sets the URL used by this RowSet to access the database via a DriverManager .
abstract void setUrl ( String theURL)
Sets the URL used by this RowSet to access the database via a DriverManager .
abstract void setUsername ( String theUsername)
Sets the Username property for the RowSet , used to authenticate a connection to the database.
[Expand]
Inherited Methods
From interface java.lang.AutoCloseable
From interface java.sql.ResultSet
From interface java.sql.Wrapper

Public Methods

public abstract void addRowSetListener ( RowSetListener theListener)

Added in API level 1

Registers the 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 abstract void clearParameters ()

Added in API level 1

Clears the parameters previously set for this RowSet .

The RowSet object retains its value until either a new value for a parameter is set or its value is actively reset. clearParameters provides a facility to clear the values for all parameters with one method call.

Throws
SQLException if a problem occurs accessing the database.

public abstract void execute ()

Added in API level 1

Fetches data for this RowSet from the database. If successful, any existing data for the RowSet is discarded and its metadata is overwritten.

Data is retrieved connecting to the database and executing an according SQL statement. This requires some or all of the following properties to be set: URL, database 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 it will then invoke the readData(RowSetInternal) method on the reader to fetch the data. When the new data is fetched all the listeners are notified to take appropriate measures.

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

public abstract String getCommand ()

Added in API level 1

Gets the RowSet 's command property.

Returns
  • a string containing the RowSet 's command property. A command is a SQL statement which is executed to fetch required data into the RowSet .

public abstract String getDataSourceName ()

Added in API level 1

Gets the ODBC Data Source Name property associated with this RowSet . The database 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.

Returns
  • the name of the database.

public abstract boolean getEscapeProcessing ()

Added in API level 1

Reports if escape processing is enabled for this RowSet . If escape processing is on, the driver performs a substitution of the escape syntax with the applicable code before sending an SQL command to the database. The default value for escape processing is true .

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

public abstract int getMaxFieldSize ()

Added in API level 1

Gets the maximum number of bytes that can be returned for column values which are of type 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 implies no size limit.
Throws
SQLException if a problem occurs accessing the database.

public abstract int getMaxRows ()

Added in API level 1

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 row limit.
Throws
SQLException if a problem occurs accessing the database.

public abstract String getPassword ()

Added in API level 1

Gets the value of the password property for this RowSet . This property is used when a connection to the database is established. Therefore it should be set prior to invoking the execute() method.

Returns
  • the value of the password property.

public abstract int getQueryTimeout ()

Added in API level 1

Gets the timeout for the driver when a query operation is executed. If a query takes longer than the timeout then a SQLException is thrown.

Returns
  • the timeout value in seconds.
Throws
SQLException if an error occurs accessing the database.

public abstract int getTransactionIsolation ()

Added in API level 1

Gets the transaction isolation level property set for this RowSet . The transaction isolation level defines the policy implemented on the database for maintaining the data values consistent.

Returns
  • the current transaction isolation level. Must be one of:
    • Connection.TRANSACTION_READ_UNCOMMITTED
    • Connection.TRANSACTION_READ_COMMITTED
    • Connection.TRANSACTION_REPEATABLE_READ
    • Connection.TRANSACTION_SERIALIZABLE
See Also

public abstract Map < String Class <?>> getTypeMap ()

Added in API level 1

Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes for this RowSet , if applicable.

Returns
  • the custom mappings of SQL types to Java classes.
Throws
SQLException if an error occurs accessing the database.

public abstract String getUrl ()

Added in API level 1

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 abstract String getUsername ()

Added in API level 1

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 holding the value of the username property.

public abstract boolean isReadOnly ()

Added in API level 1

Indicates if this RowSet is read-only.

Returns
  • true if this RowSet is read-only, false if it is updatable.

public abstract void removeRowSetListener ( RowSetListener theListener)

Added in API level 1

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 abstract void setArray (int parameterIndex, Array theArray)

Added in API level 1

Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theArray the Array data value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setAsciiStream (int parameterIndex, InputStream theInputStream, int length)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theInputStream the ASCII data value to which the parameter is set.
length the length of the data in bytes.
Throws
SQLException if an error occurs accessing the database.

public abstract void setAsciiStream ( String parameterName, InputStream theInputStream, int length)

Added in API level 9

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
parameterName the name for parameter
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 abstract void setAsciiStream ( String parameterName, InputStream theInputStream)

Added in API level 9

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
parameterName the name for parameter
theInputStream an InputStream containing the ASCII data to set into the parameter value
Throws
SQLException if an error occurs accessing the database.

public abstract void setAsciiStream (int parameterIndex, InputStream theInputStream)

Added in API level 9

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
Throws
SQLException if an error occurs accessing the database.

public abstract void setBigDecimal (int parameterIndex, BigDecimal theBigDecimal)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theBigDecimal the big decimal value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setBigDecimal ( String parameterName, BigDecimal theBigDecimal)

Added in API level 9

Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value.

Parameters
parameterName the name for parameter
theBigDecimal the BigDecimal containing the value
Throws
SQLException if an error occurs accessing the database.

public abstract void setBinaryStream (int parameterIndex, InputStream theInputStream)

Added in API level 9

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
Throws
SQLException if an error occurs accessing the database.

public abstract void setBinaryStream ( String parameterName, InputStream theInputStream)

Added in API level 9

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
parameterName the name for parameter
theInputStream an InputStream containing the binary data to set into the parameter value
Throws
SQLException if an error occurs accessing the database.

public abstract void setBinaryStream (int parameterIndex, InputStream theInputStream, int length)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to the binary data in the supplied input stream. Data is read from the input stream until end-of-file is reached.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theInputStream the binary data stream to which the parameter is set.
length the length of the data in bytes.
Throws
SQLException if an error occurs accessing the database.

public abstract void setBinaryStream ( String parameterName, InputStream theInputStream, int length)

Added in API level 9

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
parameterName the name for parameter
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 abstract void setBlob (int parameterIndex, InputStream theInputStream, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream. 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 abstract void setBlob (int parameterIndex, InputStream theInputStream)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream. 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
Throws
SQLException if an error occurs accessing the database.

public abstract void setBlob ( String parameterName, InputStream theInputStream, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream. Data is read from the InputStream until end-of-file is reached.

Parameters
parameterName the name for parameter
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 abstract void setBlob ( String parameterName, InputStream theInputStream)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream. Data is read from the InputStream until end-of-file is reached.

Parameters
parameterName the name for parameter
theInputStream an InputStream containing the binary data to set into the parameter value
Throws
SQLException if an error occurs accessing the database.

public abstract void setBlob ( String parameterName, Blob theBlob)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.

Parameters
parameterName the name for parameter
theBlob the Blob value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setBlob (int parameterIndex, Blob theBlob)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to the supplied Blob value.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theBlob the Blob value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setBoolean ( String parameterName, boolean theBoolean)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied boolean.

Parameters
parameterName name for parameter
theBoolean the boolean value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setBoolean (int parameterIndex, boolean theBoolean)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to the supplied boolean.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theBoolean the boolean value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setByte (int parameterIndex, byte theByte)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to the supplied byte value.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theByte the byte value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setByte ( String parameterName, byte theByte)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied byte value.

Parameters
parameterName name for parameter
theByte the byte value to set
Throws
SQLException if an error occurs accessing the database.

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

Added in API level 1

Sets the value of the specified parameter in the RowSet command to the supplied byte array value.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theByteArray the Array of bytes to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setBytes ( String parameterName, byte[] theByteArray)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied byte array value.

Parameters
parameterName name for parameter
theByteArray the array of bytes to set into the parameter.
Throws
SQLException if an error occurs accessing the database.

public abstract void setCharacterStream ( String parameterName, Reader theReader, int length)

Added in API level 9

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
parameterName name for parameter
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 abstract void setCharacterStream ( String parameterName, Reader theReader)

Added in API level 9

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
parameterName name for parameter
theReader the Reader which contains the Unicode data to set into the parameter
Throws
SQLException if an error occurs accessing the database.

public abstract void setCharacterStream (int parameterIndex, Reader theReader)

Added in API level 9

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
Throws
SQLException if an error occurs accessing the database.

public abstract void setCharacterStream (int parameterIndex, Reader theReader, int length)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theReader the Reader which contains the Unicode data to set the parameter.
length the length of the data in the Reader in characters.
Throws
SQLException if an error occurs accessing the database.

public abstract void setClob (int parameterIndex, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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 abstract void setClob ( String parameterName, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
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 abstract void setClob (int parameterIndex, Clob theClob)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theClob the Clob value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setClob (int parameterIndex, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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
Throws
SQLException if an error occurs accessing the database.

public abstract void setClob ( String parameterName, Clob theClob)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.

Parameters
parameterName name for parameter
theClob the specific Clob object
Throws
SQLException if an error occurs accessing the database.

public abstract void setClob ( String parameterName, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
theReader the Reader which contains the Unicode data to set into the parameter
Throws
SQLException if an error occurs accessing the database.

public abstract void setCommand ( String cmd)

Added in API level 1

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 databases that do not support commands.

Parameters
cmd the SQL query. Can be null .
Throws
SQLException if an error occurs accessing the database.

public abstract void setConcurrency (int concurrency)

Added in API level 1

Sets the concurrency property of this RowSet . The default value is ResultSet.CONCUR_READ_ONLY .

Parameters
concurrency the concurrency value. One of:
  • ResultSet.CONCUR_READ_ONLY
  • ResultSet.CONCUR_UPDATABLE
Throws
SQLException if an error occurs accessing the database.
See Also

public abstract void setDataSourceName ( String name)

Added in API level 1

Sets the database name property for the RowSet .

The database 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 the database name.
Throws
SQLException if an error occurs accessing the database.

public abstract void setDate (int parameterIndex, Date theDate, Calendar theCalendar)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theDate the date to which the parameter is set.
theCalendar the Calendar to use in converting the Date to an SQL DATE value.
Throws
SQLException if an error occurs accessing the database.

public abstract void setDate (int parameterIndex, Date theDate)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theDate the date value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setDate ( String parameterName, Date theDate, Calendar theCalendar)

Added in API level 9

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
parameterName name for parameter
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 abstract void setDate ( String parameterName, Date theDate)

Added in API level 9

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
parameterName name for parameter
theDate the Date to use
Throws
SQLException if an error occurs accessing the database.

public abstract void setDouble (int parameterIndex, double theDouble)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the supplied double .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theDouble the double value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setDouble ( String parameterName, double theDouble)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the supplied double.

Parameters
parameterName name for parameter
theDouble the double value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setEscapeProcessing (boolean enable)

Added in API level 1

Sets the escape processing status for this RowSet . If escape processing is on, the driver performs a substitution of the escape syntax with the applicable code before sending an SQL command to the database. The default value for escape processing is true .

Parameters
enable true to enable escape processing, false to turn it off.
Throws
SQLException if an error occurs accessing the database.

public abstract void setFloat (int parameterIndex, float theFloat)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the supplied float .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theFloat the float value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setFloat ( String parameterName, float theFloat)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the supplied float.

Parameters
parameterName name for parameter
theFloat the float value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setInt (int parameterIndex, int theInteger)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the supplied integer .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theInteger the integer value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setInt ( String parameterName, int theInteger)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the supplied integer.

Parameters
parameterName name for parameter
theInteger the integer value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setLong (int parameterIndex, long theLong)

Added in API level 1

Sets the value of the specified parameter in the RowSet command with the supplied long .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theLong the long value value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setLong ( String parameterName, long theLong)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the supplied long.

Parameters
parameterName name for parameter
theLong the long value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setMaxFieldSize (int max)

Added in API level 1

Sets the maximum number of bytes which can be returned for a column value where the column type is one of 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 implies no size limit.
Throws
SQLException if an error occurs accessing the database.

public abstract void setMaxRows (int max)

Added in API level 1

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 abstract void setNCharacterStream (int parameterIndex, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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
Throws
SQLException if an error occurs accessing the database.

public abstract void setNCharacterStream ( String parameterName, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
theReader the Reader which contains the Unicode data to set into the parameter
Throws
SQLException if an error occurs accessing the database.

public abstract void setNCharacterStream ( String parameterName, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
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 abstract void setNCharacterStream (int parameterIndex, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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 abstract void setNClob ( String parameterName, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
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 abstract void setNClob ( String parameterName, NClob theNClob)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.

Parameters
parameterName name for parameter
theNClob the NClob value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setNClob (int parameterIndex, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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
Throws
SQLException if an error occurs accessing the database.

public abstract void setNClob ( String parameterName, Reader theReader)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.

Parameters
parameterName name for parameter
theReader the Reader which contains the Unicode data to set into the parameter
Throws
SQLException if an error occurs accessing the database.

public abstract void setNClob (int parameterIndex, NClob theNClob)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.

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

public abstract void setNClob (int parameterIndex, Reader theReader, long length)

Added in API level 9

Sets the value of the specified parameter in the RowSet command with the value of a 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 abstract void setNString ( String parameterName, String theNString)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied NString.

Parameters
parameterName name for parameter
theNString the NString value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setNString (int parameterIndex, String theNString)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied NString

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

public abstract void setNull ( String parameterName, int sqlType)

Added in API level 9

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
parameterName name for parameter
sqlType the type of the parameter, as defined by java.sql.Types.
Throws
SQLException if an error occurs accessing the database.

public abstract void setNull ( String parameterName, int sqlType, String typeName)

Added in API level 9

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
parameterName name for parameter
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 abstract void setNull (int parameterIndex, int sqlType, String typeName)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 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 abstract void setNull (int parameterIndex, int sqlType)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to SQL NULL .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
sqlType the type of the parameter, as defined by java.sql.Types .
Throws
SQLException if an error occurs accessing the database.

public abstract void setObject ( String parameterName, Object theObject)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters
parameterName name for parameter
theObject the Java object containing the data value.
Throws
SQLException if an error occurs accessing the database.

public abstract void setObject ( String parameterName, Object theObject, int targetSqlType)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters
parameterName name for parameter
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 abstract void setObject ( String parameterName, Object theObject, int targetSqlType, int scale)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters
parameterName name for parameter
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 abstract void setObject (int parameterIndex, Object theObject, int targetSqlType, int scale)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 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 abstract void setObject (int parameterIndex, Object theObject)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theObject the Java object containing the data value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

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

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied Java object.

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 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 abstract void setPassword ( String password)

Added in API level 1

Sets the database Password for this RowSet . This property is used when a connection to the database is established. Therefore it should be set prior to invoking the execute() method.

Parameters
password a String holding the password.
Throws
SQLException if an error occurs accessing the database.

public abstract void setQueryTimeout (int seconds)

Added in API level 1

Gets the timeout for the driver when a query operation is executed. If a query takes longer than the timeout, a SQLException is thrown.

Parameters
seconds the number of seconds for the timeout.
Throws
SQLException if an error occurs accessing the database.

public abstract void setReadOnly (boolean readOnly)

Added in API level 1

Sets whether the RowSet is read-only or updatable.

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

public abstract void setRef (int parameterIndex, Ref theRef)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theRef the value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.
See Also

public abstract void setRowId (int parameterIndex, RowId theRowId)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied RowId

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

public abstract void setRowId ( String parameterName, RowId theRowId)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied RowId.

Parameters
parameterName name for parameter
theRowId the RowId value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setSQLXML ( String parameterName, SQLXML theSQLXML)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied SQLXML.

Parameters
parameterName name for parameter
theSQLXML the SQLXML value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setSQLXML (int parameterIndex, SQLXML theSQLXML)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to the supplied SQLXML

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

public abstract void setShort (int parameterIndex, short theShort)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied short integer .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theShort the value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setShort ( String parameterName, short theShort)

Added in API level 9

Sets the value of the specified parameter in the RowSet command to a supplied short integer.

Parameters
parameterName name for parameter
theShort the short value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setString (int parameterIndex, String theString)

Added in API level 1

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 the index of the parameter to set; the first parameter's index is 1.
theString the value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setString ( String parameterName, String theString)

Added in API level 9

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
parameterName name for parameter
Throws
SQLException if an error occurs accessing the database.

public abstract void setTime (int parameterIndex, Time theTime)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time , converting it to an SQL TIME value using the system default Calendar .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theTime the value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setTime ( String parameterName, Time theTime, Calendar theCalendar)

Added in API level 9

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
parameterName name for parameter
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 abstract void setTime (int parameterIndex, Time theTime, Calendar theCalendar)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time , converting it to an SQL TIME value using a supplied Calendar .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theTime the value to which the parameter is set.
theCalendar the Calendar to use in the conversion operation.
Throws
SQLException if an error occurs accessing the database.

public abstract void setTime ( String parameterName, Time theTime)

Added in API level 9

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
parameterName name for parameter
theTime the Time value to set
Throws
SQLException if an error occurs accessing the database.

public abstract void setTimestamp (int parameterIndex, Timestamp theTimestamp, Calendar theCalendar)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp , converting it to an SQL TIMESTAMP value using a supplied Calendar .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theTimestamp the value to which the parameter is set.
theCalendar the Calendar to use in the conversion operation
Throws
SQLException if an error occurs accessing the database.

public abstract void setTimestamp ( String parameterName, Timestamp theTimestamp, Calendar theCalendar)

Added in API level 9

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
parameterName name for parameter
theTimestamp the value to which the parameter is set
theCalendar the Calendar to use in the conversion operation
Throws
SQLException if an error occurs accessing the database.

public abstract void setTimestamp ( String parameterName, Timestamp theTimestamp)

Added in API level 9

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
parameterName name for parameter
theTimestamp the value to which the parameter is set
Throws
SQLException if an error occurs accessing the database.

public abstract void setTimestamp (int parameterIndex, Timestamp theTimestamp)

Added in API level 1

Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp , converting it to an SQL TIMESTAMP value using the system default Calendar .

Parameters
parameterIndex the index of the parameter to set; the first parameter's index is 1.
theTimestamp the value to which the parameter is set.
Throws
SQLException if an error occurs accessing the database.

public abstract void setTransactionIsolation (int level)

Added in API level 1

Sets the target instance's transaction isolation level to one of a discrete set of possible values. The transaction isolation level defines the policy implemented on the database for maintaining the data values consistent.

Keep in mind that setting a transaction isolation level has no effect unless your driver and DBMS support it.

Parameters
level the transaction isolation level. One of:
  • Connection.TRANSACTION_READ_UNCOMMITTED
  • Connection.TRANSACTION_READ_COMMITTED
  • Connection.TRANSACTION_REPEATABLE_READ
  • Connection.TRANSACTION_SERIALIZABLE
Throws
SQLException if an error occurs accessing the database.
See Also

public abstract void setType (int type)

Added in API level 1

Sets the type of this RowSet . By default, the type is non-scrollable.

Parameters
type the type for the RowSet . One of:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Throws
SQLException if an error occurs accessing the database.
>)">

public abstract void setTypeMap ( Map < String Class <?>> theTypeMap)

Added in API level 1

Sets the mapping of SQL User Defined Types (UDTs) to Java classes. The Java classes must all implement the SQLData interface.

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

public abstract void setURL (int parameterIndex, URL theURL)

Added in API level 9

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
parameterIndex index of the parameter to set, where the first parameter has index = 1.
theURL a java.net.URL containing the URL for the database.
Throws
SQLException if an error occurs accessing the database.

public abstract void setUrl ( String theURL)

Added in API level 1

Sets the URL used by this RowSet to access the database via a DriverManager . The URL is optional - an alternative is to use a database name to create a connection.

Parameters
theURL the URL for the database. Can be null .
Throws
SQLException if an error occurs accessing the database.

public abstract void setUsername ( String theUsername)

Added in API level 1

Sets the Username property for the RowSet , used to authenticate a connection to the database.

Parameters
theUsername the new user name for this row set.
Throws
SQLException if an error occurs accessing the database.