Interface RowSet
- All Superinterfaces:
AutoCloseable,ResultSet,Wrapper
public interface RowSet extends ResultSet
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.
- See Also:
RowSetReader,RowSetWriter
-
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE -
Method Summary
Modifier and Type Method Description voidaddRowSetListener(RowSetListener theListener)Registers the suppliedRowSetListenerwith thisRowSet.voidclearParameters()Clears the parameters previously set for thisRowSet.voidexecute()Fetches data for thisRowSetfrom the database.StringgetCommand()Gets theRowSet's command property.StringgetDataSourceName()Gets the ODBC Data Source Name property associated with thisRowSet.booleangetEscapeProcessing()Reports if escape processing is enabled for thisRowSet.intgetMaxFieldSize()Gets the maximum number of bytes that can be returned for column values which are of typeBINARY,VARBINARY,LONGVARBINARYBINARY,CHAR,VARCHAR, orLONGVARCHAR.intgetMaxRows()Gets the maximum number of rows for thisRowSet.StringgetPassword()Gets the value of the password property for thisRowSet.intgetQueryTimeout()Gets the timeout for the driver when a query operation is executed.intgetTransactionIsolation()Gets the transaction isolation level property set for thisRowSet.Map<String,Class<?>>getTypeMap()Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes for thisRowSet, if applicable.StringgetUrl()Gets the URL property value for thisRowSet.StringgetUsername()Gets the value of theusernameproperty for thisRowSet.booleanisReadOnly()Indicates if thisRowSetis read-only.voidremoveRowSetListener(RowSetListener theListener)Removes a specifiedRowSetListenerobject from the set of listeners which will be notified of events by thisRowSet.voidsetArray(int parameterIndex, Array theArray)Sets the specifiedARRAYparameter in theRowSetcommand with the suppliedjava.sql.Arrayvalue.voidsetAsciiStream(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.voidsetAsciiStream(int parameterIndex, InputStream theInputStream, int length)Sets the value of the specified parameter in theRowSetcommand with the ASCII data in the suppliedjava.io.InputStreamvalue.voidsetAsciiStream(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.voidsetAsciiStream(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.voidsetBigDecimal(int parameterIndex, BigDecimal theBigDecimal)Sets the value of the specified SQLNUMERICparameter in theRowSetcommand with the data in the suppliedjava.math.BigDecimalvalue.voidsetBigDecimal(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.voidsetBinaryStream(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.voidsetBinaryStream(int parameterIndex, InputStream theInputStream, int length)Sets the value of the specified parameter in theRowSetcommand to the binary data in the supplied input stream.voidsetBinaryStream(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.voidsetBinaryStream(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.voidsetBlob(int parameterIndex, InputStream theInputStream)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.voidsetBlob(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.voidsetBlob(int parameterIndex, Blob theBlob)Sets the value of the specified parameter in theRowSetcommand to the suppliedBlobvalue.voidsetBlob(String parameterName, InputStream theInputStream)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.InputStream.voidsetBlob(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.voidsetBlob(String parameterName, Blob theBlob)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.voidsetBoolean(int parameterIndex, boolean theBoolean)Sets the value of the specified parameter in theRowSetcommand to the supplied boolean.voidsetBoolean(String parameterName, boolean theBoolean)Sets the value of the specified parameter in the RowSet command to the supplied boolean.voidsetByte(int parameterIndex, byte theByte)Sets the value of the specified parameter in theRowSetcommand to the supplied byte value.voidsetByte(String parameterName, byte theByte)Sets the value of the specified parameter in the RowSet command to the supplied byte value.voidsetBytes(int parameterIndex, byte[] theByteArray)Sets the value of the specified parameter in theRowSetcommand to the supplied byte array value.voidsetBytes(String parameterName, byte[] theByteArray)Sets the value of the specified parameter in the RowSet command to the supplied byte array value.voidsetCharacterStream(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.voidsetCharacterStream(int parameterIndex, Reader theReader, int length)Sets the value of the specified parameter in theRowSetcommand to the sequence of Unicode characters carried by the suppliedjava.io.Reader.voidsetCharacterStream(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.voidsetCharacterStream(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.voidsetClob(int parameterIndex, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetClob(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.voidsetClob(int parameterIndex, Clob theClob)Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.sql.Clob.voidsetClob(String parameterName, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetClob(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.voidsetClob(String parameterName, Clob theClob)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.voidsetCommand(String cmd)Sets the Command property for thisRowSet- the command is an SQL query which runs when theexecutemethod is invoked.voidsetConcurrency(int concurrency)Sets the concurrency property of thisRowSet.voidsetDataSourceName(String name)Sets the database name property for theRowSet.voidsetDate(int parameterIndex, Date theDate)Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.sql.Date.voidsetDate(int parameterIndex, Date theDate, Calendar theCalendar)Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.sql.Date, where the conversion of the date to an SQLDATEvalue is calculated using a suppliedCalendar.voidsetDate(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.voidsetDate(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.voidsetDouble(int parameterIndex, double theDouble)Sets the value of the specified parameter in theRowSetcommand with the supplieddouble.voidsetDouble(String parameterName, double theDouble)Sets the value of the specified parameter in the RowSet command with the supplied double.voidsetEscapeProcessing(boolean enable)Sets the escape processing status for thisRowSet.voidsetFloat(int parameterIndex, float theFloat)Sets the value of the specified parameter in theRowSetcommand with the suppliedfloat.voidsetFloat(String parameterName, float theFloat)Sets the value of the specified parameter in the RowSet command with the supplied float.voidsetInt(int parameterIndex, int theInteger)Sets the value of the specified parameter in theRowSetcommand with the suppliedinteger.voidsetInt(String parameterName, int theInteger)Sets the value of the specified parameter in the RowSet command with the supplied integer.voidsetLong(int parameterIndex, long theLong)Sets the value of the specified parameter in theRowSetcommand with the suppliedlong.voidsetLong(String parameterName, long theLong)Sets the value of the specified parameter in the RowSet command with the supplied long.voidsetMaxFieldSize(int max)Sets the maximum number of bytes which can be returned for a column value where the column type is one ofBINARY,VARBINARY,LONGVARBINARYBINARY,CHAR,VARCHAR, orLONGVARCHAR.voidsetMaxRows(int max)Sets the maximum number of rows which can be held by theRowSet.voidsetNCharacterStream(int parameterIndex, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetNCharacterStream(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.voidsetNCharacterStream(String parameterName, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetNCharacterStream(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.voidsetNClob(int parameterIndex, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetNClob(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.voidsetNClob(int parameterIndex, NClob theNClob)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.voidsetNClob(String parameterName, Reader theReader)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.voidsetNClob(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.voidsetNClob(String parameterName, NClob theNClob)Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.voidsetNString(int parameterIndex, String theNString)Sets the value of the specified parameter in the RowSet command to the supplied NStringvoidsetNString(String parameterName, String theNString)Sets the value of the specified parameter in the RowSet command to the supplied NString.voidsetNull(int parameterIndex, int sqlType)Sets the value of the specified parameter in theRowSetcommand to SQLNULL.voidsetNull(int parameterIndex, int sqlType, String typeName)Sets the value of the specified parameter in theRowSetcommand to SQLNULL.voidsetNull(String parameterName, int sqlType)Sets the value of the specified parameter in the RowSet command to SQL NULL.voidsetNull(String parameterName, int sqlType, String typeName)Sets the value of the specified parameter in the RowSet command to SQL NULL.voidsetObject(int parameterIndex, Object theObject)Sets the value of the specified parameter in theRowSetcommand to a supplied Java object.voidsetObject(int parameterIndex, Object theObject, int targetSqlType)Sets the value of the specified parameter in theRowSetcommand to a supplied Java object.voidsetObject(int parameterIndex, Object theObject, int targetSqlType, int scale)Sets the value of the specified parameter in theRowSetcommand to a supplied Java object.voidsetObject(String parameterName, Object theObject)Sets the value of the specified parameter in the RowSet command to a supplied Java object.voidsetObject(String parameterName, Object theObject, int targetSqlType)Sets the value of the specified parameter in the RowSet command to a supplied Java object.voidsetObject(String parameterName, Object theObject, int targetSqlType, int scale)Sets the value of the specified parameter in the RowSet command to a supplied Java object.voidsetPassword(String password)Sets the database Password for thisRowSet.voidsetQueryTimeout(int seconds)Gets the timeout for the driver when a query operation is executed.voidsetReadOnly(boolean readOnly)Sets whether theRowSetis read-only or updatable.voidsetRef(int parameterIndex, Ref theRef)Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Ref.voidsetRowId(int parameterIndex, RowId theRowId)Sets the value of the specified parameter in the RowSet command to the supplied RowIdvoidsetRowId(String parameterName, RowId theRowId)Sets the value of the specified parameter in the RowSet command to the supplied RowId.voidsetShort(int parameterIndex, short theShort)Sets the value of the specified parameter in theRowSetcommand to a suppliedshort integer.voidsetShort(String parameterName, short theShort)Sets the value of the specified parameter in the RowSet command to a supplied short integer.voidsetSQLXML(int parameterIndex, SQLXML theSQLXML)Sets the value of the specified parameter in the RowSet command to the supplied SQLXMLvoidsetSQLXML(String parameterName, SQLXML theSQLXML)Sets the value of the specified parameter in the RowSet command to the supplied SQLXML.voidsetString(int parameterIndex, String theString)Sets the value of the specified parameter in theRowSetcommand to a suppliedString.voidsetString(String parameterName, String theString)Sets the value of the specified parameter in the RowSet command to a supplied String.voidsetTime(int parameterIndex, Time theTime)Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Time, converting it to an SQLTIMEvalue using the system defaultCalendar.voidsetTime(int parameterIndex, Time theTime, Calendar theCalendar)Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Time, converting it to an SQLTIMEvalue using a suppliedCalendar.voidsetTime(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.voidsetTime(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.voidsetTimestamp(int parameterIndex, Timestamp theTimestamp)Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Timestamp, converting it to an SQLTIMESTAMPvalue using the system defaultCalendar.voidsetTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar)Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Timestamp, converting it to an SQLTIMESTAMPvalue using a suppliedCalendar.voidsetTimestamp(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 defaultCalendar.voidsetTimestamp(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.voidsetTransactionIsolation(int level)Sets the target instance's transaction isolation level to one of a discrete set of possible values.voidsetType(int type)Sets the type of thisRowSet.voidsetTypeMap(Map<String,Class<?>> theTypeMap)Sets the mapping of SQL User Defined Types (UDTs) to Java classes.voidsetUrl(String theURL)Sets the URL used by thisRowSetto access the database via aDriverManager.voidsetURL(int parameterIndex, URL theURL)Sets the URL used by this RowSet to access the database via aDriverManager.voidsetUsername(String theUsername)Sets theUsernameproperty for theRowSet, used to authenticate a connection to the database.Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
addRowSetListener
Registers the suppliedRowSetListenerwith thisRowSet. Once registered, theRowSetListeneris notified of events generated by theRowSet.- Parameters:
theListener- an object which implements therowSetListenerinterface.
-
clearParameters
Clears the parameters previously set for thisRowSet.The
RowSetobject retains its value until either a new value for a parameter is set or its value is actively reset.clearParametersprovides a facility to clear the values for all parameters with one method call.- Throws:
SQLException- if a problem occurs accessing the database.
-
execute
Fetches data for thisRowSetfrom the database. If successful, any existing data for theRowSetis 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
RowSetmay use aRowSetReaderto access the database it will then invoke theRowSetReader.readData(javax.sql.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.- See Also:
RowSetMetaData,RowSetReader
-
getCommand
String getCommand()Gets theRowSet'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 theRowSet.
-
getDataSourceName
String getDataSourceName()Gets the ODBC Data Source Name property associated with thisRowSet. The database name can be used to find aDataSourcewhich has been registered with a naming service - theDataSourcecan then be used to create a connection to the database.- Returns:
- the name of the database.
-
getEscapeProcessing
Reports if escape processing is enabled for thisRowSet. 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 istrue.- Returns:
trueif escape processing is enabled,falseotherwise.- Throws:
SQLException- if a problem occurs accessing the database.
-
getMaxFieldSize
Gets the maximum number of bytes that can be returned for column values which are of typeBINARY,VARBINARY,LONGVARBINARYBINARY,CHAR,VARCHAR, orLONGVARCHAR. 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.
-
getMaxRows
Gets the maximum number of rows for thisRowSet. 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.
-
getPassword
String getPassword()Gets the value of the password property for thisRowSet. This property is used when a connection to the database is established. Therefore it should be set prior to invoking theexecute()method.- Returns:
- the value of the password property.
-
getQueryTimeout
Gets the timeout for the driver when a query operation is executed. If a query takes longer than the timeout then aSQLExceptionis thrown.- Returns:
- the timeout value in seconds.
- Throws:
SQLException- if an error occurs accessing the database.
-
getTransactionIsolation
int getTransactionIsolation()Gets the transaction isolation level property set for thisRowSet. 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_UNCOMMITTEDConnection.TRANSACTION_READ_COMMITTEDConnection.TRANSACTION_REPEATABLE_READConnection.TRANSACTION_SERIALIZABLE
- See Also:
Connection
-
getTypeMap
Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes for thisRowSet, if applicable.- Returns:
- the custom mappings of SQL types to Java classes.
- Throws:
SQLException- if an error occurs accessing the database.
-
getUrl
Gets the URL property value for thisRowSet. If there is noDataSourceobject specified, theRowSetuses the URL to establish a connection to the database. The default value for the URL isnull.- Returns:
- a String holding the value of the URL property.
- Throws:
SQLException- if an error occurs accessing the database.
-
getUsername
String getUsername()Gets the value of theusernameproperty for thisRowSet. Theusernameis used when establishing a connection to the database and should be set before theexecutemethod is invoked.- Returns:
- a
Stringholding the value of theusernameproperty.
-
isReadOnly
boolean isReadOnly()Indicates if thisRowSetis read-only.- Returns:
trueif thisRowSetis read-only,falseif it is updatable.
-
removeRowSetListener
Removes a specifiedRowSetListenerobject from the set of listeners which will be notified of events by thisRowSet.- Parameters:
theListener- theRowSetListenerto remove from the set of listeners for thisRowSet.
-
setArray
Sets the specifiedARRAYparameter in theRowSetcommand with the suppliedjava.sql.Arrayvalue.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theArray- theArraydata value to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setAsciiStream
void setAsciiStream(int parameterIndex, InputStream theInputStream, int length) throws SQLExceptionSets the value of the specified parameter in theRowSetcommand with the ASCII data in the suppliedjava.io.InputStreamvalue. Data is read from theInputStreamuntil 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.
-
setAsciiStream
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.
-
setAsciiStream
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 parametertheInputStream- an InputStream containing the ASCII data to set into the parameter value- Throws:
SQLException- if an error occurs accessing the database.
-
setAsciiStream
void setAsciiStream(String parameterName, InputStream theInputStream, int length) throws SQLExceptionSets 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 parametertheInputStream- an InputStream containing the ASCII data to set into the parameter valuelength- the length of the data in bytes- Throws:
SQLException- if an error occurs accessing the database.
-
setBigDecimal
Sets the value of the specified SQLNUMERICparameter in theRowSetcommand with the data in the suppliedjava.math.BigDecimalvalue.- 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.
-
setBigDecimal
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 parametertheBigDecimal- the BigDecimal containing the value- Throws:
SQLException- if an error occurs accessing the database.
-
setBinaryStream
void setBinaryStream(int parameterIndex, InputStream theInputStream, int length) throws SQLExceptionSets the value of the specified parameter in theRowSetcommand 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.
-
setBinaryStream
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.
-
setBinaryStream
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 parametertheInputStream- an InputStream containing the binary data to set into the parameter value- Throws:
SQLException- if an error occurs accessing the database.
-
setBinaryStream
void setBinaryStream(String parameterName, InputStream theInputStream, int length) throws SQLExceptionSets 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 parametertheInputStream- an InputStream containing the binary data to set into the parameter valuelength- the length of the data in bytes- Throws:
SQLException- if an error occurs accessing the database.
-
setBlob
Sets the value of the specified parameter in theRowSetcommand to the suppliedBlobvalue.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theBlob- theBlobvalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setBlob
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.
-
setBlob
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 valuelength- the length of the data in bytes- Throws:
SQLException- if an error occurs accessing the database.
-
setBlob
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 parametertheInputStream- an InputStream containing the binary data to set into the parameter value- Throws:
SQLException- if an error occurs accessing the database.
-
setBlob
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 parametertheInputStream- an InputStream containing the binary data to set into the parameter valuelength- the length of the data in bytes- Throws:
SQLException- if an error occurs accessing the database.
-
setBlob
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 parametertheBlob- the Blob value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setBoolean
Sets the value of the specified parameter in theRowSetcommand to the supplied boolean.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theBoolean- thebooleanvalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setBoolean
Sets the value of the specified parameter in the RowSet command to the supplied boolean.- Parameters:
parameterName- name for parametertheBoolean- the boolean value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setByte
Sets the value of the specified parameter in theRowSetcommand to the supplied byte value.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theByte- thebytevalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setByte
Sets the value of the specified parameter in the RowSet command to the supplied byte value.- Parameters:
parameterName- name for parametertheByte- the byte value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setBytes
Sets the value of the specified parameter in theRowSetcommand to the supplied byte array value.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theByteArray- theArrayofbytesto which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setBytes
Sets the value of the specified parameter in the RowSet command to the supplied byte array value.- Parameters:
parameterName- name for parametertheByteArray- the array of bytes to set into the parameter.- Throws:
SQLException- if an error occurs accessing the database.
-
setCharacterStream
Sets the value of the specified parameter in theRowSetcommand to the sequence of Unicode characters carried by the suppliedjava.io.Reader.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theReader- theReaderwhich contains the Unicode data to set the parameter.length- the length of the data in theReaderin characters.- Throws:
SQLException- if an error occurs accessing the database.
-
setCharacterStream
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.
-
setCharacterStream
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 parametertheReader- the Reader which contains the Unicode data to set into the parameter- Throws:
SQLException- if an error occurs accessing the database.
-
setCharacterStream
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 parametertheReader- the Reader which contains the Unicode data to set into the parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setClob
Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.sql.Clob.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theClob- theClobvalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setClob
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.
-
setClob
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 parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.- Parameters:
parameterName- name for parametertheClob- the specific Clob object- Throws:
SQLException- if an error occurs accessing the database.
-
setClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameter- Throws:
SQLException- if an error occurs accessing the database.
-
setClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setCommand
Sets the Command property for thisRowSet- the command is an SQL query which runs when theexecutemethod is invoked. This property is optional for databases that do not support commands.- Parameters:
cmd- the SQL query. Can benull.- Throws:
SQLException- if an error occurs accessing the database.
-
setConcurrency
Sets the concurrency property of thisRowSet. The default value isResultSet.CONCUR_READ_ONLY.- Parameters:
concurrency- the concurrency value. One of:ResultSet.CONCUR_READ_ONLYResultSet.CONCUR_UPDATABLE
- Throws:
SQLException- if an error occurs accessing the database.- See Also:
ResultSet
-
setDataSourceName
Sets the database name property for theRowSet.The database name can be used to find a
DataSourcewhich has been registered with a naming service - theDataSourcecan then be used to create a connection to the database.- Parameters:
name- the database name.- Throws:
SQLException- if an error occurs accessing the database.
-
setDate
Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.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.
-
setDate
Sets the value of the specified parameter in theRowSetcommand with the value of a suppliedjava.sql.Date, where the conversion of the date to an SQLDATEvalue is calculated using a suppliedCalendar.- 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- theCalendarto use in converting the Date to an SQLDATEvalue.- Throws:
SQLException- if an error occurs accessing the database.
-
setDate
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 parametertheDate- the Date to use- Throws:
SQLException- if an error occurs accessing the database.
-
setDate
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 parametertheDate- the Date to usetheCalendar- the Calendar to use in converting the Date to an SQL DATE value- Throws:
SQLException- if an error occurs accessing the database.
-
setDouble
Sets the value of the specified parameter in theRowSetcommand with the supplieddouble.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theDouble- thedoublevalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setDouble
Sets the value of the specified parameter in the RowSet command with the supplied double.- Parameters:
parameterName- name for parametertheDouble- the double value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setEscapeProcessing
Sets the escape processing status for thisRowSet. 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 istrue.- Parameters:
enable-trueto enable escape processing,falseto turn it off.- Throws:
SQLException- if an error occurs accessing the database.
-
setFloat
Sets the value of the specified parameter in theRowSetcommand with the suppliedfloat.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theFloat- thefloatvalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setFloat
Sets the value of the specified parameter in the RowSet command with the supplied float.- Parameters:
parameterName- name for parametertheFloat- the float value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setInt
Sets the value of the specified parameter in theRowSetcommand with the suppliedinteger.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theInteger- theintegervalue to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setInt
Sets the value of the specified parameter in the RowSet command with the supplied integer.- Parameters:
parameterName- name for parametertheInteger- the integer value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setLong
Sets the value of the specified parameter in theRowSetcommand with the suppliedlong.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.theLong- thelongvalue value to which the parameter is set.- Throws:
SQLException- if an error occurs accessing the database.
-
setLong
Sets the value of the specified parameter in the RowSet command with the supplied long.- Parameters:
parameterName- name for parametertheLong- the long value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setMaxFieldSize
Sets the maximum number of bytes which can be returned for a column value where the column type is one ofBINARY,VARBINARY,LONGVARBINARYBINARY,CHAR,VARCHAR, orLONGVARCHAR. 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.
-
setMaxRows
Sets the maximum number of rows which can be held by theRowSet. Any additional rows are silently discarded.- Parameters:
max- the maximum number of rows which can be held in theRowSet. 0 means no limit.- Throws:
SQLException- if an error occurs accessing the database.
-
setNCharacterStream
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.
-
setNCharacterStream
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 parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setNCharacterStream
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameter- Throws:
SQLException- if an error occurs accessing the database.
-
setNCharacterStream
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setNClob
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.
-
setNClob
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.
-
setNClob
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 parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setNClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.NClob.- Parameters:
parameterName- name for parametertheNClob- the NClob value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setNClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameter- Throws:
SQLException- if an error occurs accessing the database.
-
setNClob
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.io.Reader.- Parameters:
parameterName- name for parametertheReader- the Reader which contains the Unicode data to set into the parameterlength- the length of the data in the Reader in characters- Throws:
SQLException- if an error occurs accessing the database.
-
setNString
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.
-
setNString
Sets the value of the specified parameter in the RowSet command to the supplied NString.- Parameters:
parameterName- name for parametertheNString- the NString value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setNull
Sets the value of the specified parameter in theRowSetcommand to SQLNULL.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.sqlType- the type of the parameter, as defined byjava.sql.Types.- Throws:
SQLException- if an error occurs accessing the database.
-
setNull
Sets the value of the specified parameter in theRowSetcommand to SQLNULL. This form of thesetNullmethod should be used for User Defined Types andREFparameters.- Parameters:
parameterIndex- the index of the parameter to set; the first parameter's index is 1.sqlType- the type of the parameter, as defined byjava.sql.Types.typeName- the fully qualified name of an SQL user defined type or the name of the SQL structured type referenced by aREFtype. Ignored if the sqlType is not a UDT or REF type.- Throws:
SQLException- if an error occurs accessing the database.
-
setNull
Sets the value of the specified parameter in the RowSet command to SQL NULL. This form of thesetNullmethod should be used for User Defined Types and REF parameters.- Parameters:
parameterName- name for parametersqlType- the type of the parameter, as defined by java.sql.Types.- Throws:
SQLException- if an error occurs accessing the database.
-
setNull
Sets the value of the specified parameter in the RowSet command to SQL NULL. This form of thesetNullmethod should be used for User Defined Types and REF parameters.- Parameters:
parameterName- name for parametersqlType- the type of the parameter, as defined by java.sql.Types.typeName- the fully qualified name of an SQL User Defined Type or the name of the SQL structured type referenced by a REF type. Ignored if the sqlType is not a UDT or REF type.- Throws:
SQLException- if an error occurs accessing the database.
-
setObject
Sets the value of the specified parameter in theRowSetcommand 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.
-
setObject
Sets the value of the specified parameter in theRowSetcommand 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 injava.sql.Types.- Throws:
SQLException- if an error occurs accessing the database.
-
setObject
void setObject(int parameterIndex, Object theObject, int targetSqlType, int scale) throws SQLExceptionSets the value of the specified parameter in theRowSetcommand 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 injava.sql.Types.scale- the number of digits after the decimal point, forjava.sql.Types.DECIMALandjava.sql.Types.NUMERICtypes. Ignored for all other types.- Throws:
SQLException- if an error occurs accessing the database.
-
setObject
Sets the value of the specified parameter in the RowSet command to a supplied Java object.- Parameters:
parameterName- name for parametertheObject- the Java object containing the data value.- Throws:
SQLException- if an error occurs accessing the database.
-
setObject
Sets the value of the specified parameter in the RowSet command to a supplied Java object.- Parameters:
parameterName- name for parametertheObject- the Java object containing the data value.targetSqlType- the SQL type to send to the database, as defined in java.sql.Types.- Throws:
SQLException- if an error occurs accessing the database.
-
setObject
void setObject(String parameterName, Object theObject, int targetSqlType, int scale) throws SQLExceptionSets the value of the specified parameter in the RowSet command to a supplied Java object.- Parameters:
parameterName- name for parametertheObject- the Java object containing the data value.targetSqlType- the SQL type to send to the database, as defined in java.sql.Types.scale- the number of digits after the decimal point, for java.sql.Types.DECIMAL and java.sql.Types.NUMERIC types. Ignored for all other types.- Throws:
SQLException- if an error occurs accessing the database.
-
setPassword
Sets the database Password for thisRowSet. This property is used when a connection to the database is established. Therefore it should be set prior to invoking theexecute()method.- Parameters:
password- aStringholding the password.- Throws:
SQLException- if an error occurs accessing the database.
-
setQueryTimeout
Gets the timeout for the driver when a query operation is executed. If a query takes longer than the timeout, aSQLExceptionis thrown.- Parameters:
seconds- the number of seconds for the timeout.- Throws:
SQLException- if an error occurs accessing the database.
-
setReadOnly
Sets whether theRowSetis read-only or updatable.- Parameters:
readOnly-trueto set theRowSetto read-only state,falseto allow updates.- Throws:
SQLException- if an error occurs accessing the database.
-
setRef
Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Ref. This is sent to the database as an SQLREFvalue.- 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:
Ref
-
setShort
Sets the value of the specified parameter in theRowSetcommand to a suppliedshort 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.
-
setShort
Sets the value of the specified parameter in the RowSet command to a supplied short integer.- Parameters:
parameterName- name for parametertheShort- the short value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setString
Sets the value of the specified parameter in theRowSetcommand to a suppliedString. The string is placed into the database as aVARCHARorLONGVARCHARSQL value, depending on the database limits for the length ofVARCHARvalues.- 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.
-
setString
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 parametertheString-- Throws:
SQLException- if an error occurs accessing the database.
-
setRowId
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.
-
setRowId
Sets the value of the specified parameter in the RowSet command to the supplied RowId.- Parameters:
parameterName- name for parametertheRowId- the RowId value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setSQLXML
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.
-
setSQLXML
Sets the value of the specified parameter in the RowSet command to the supplied SQLXML.- Parameters:
parameterName- name for parametertheSQLXML- the SQLXML value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setTime
Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Time, converting it to an SQLTIMEvalue using the system defaultCalendar.- 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.- See Also:
Calendar,Time
-
setTime
Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Time, converting it to an SQLTIMEvalue using a suppliedCalendar.- 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- theCalendarto use in the conversion operation.- Throws:
SQLException- if an error occurs accessing the database.- See Also:
Calendar,Time
-
setTime
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 parametertheTime- the Time value to set- Throws:
SQLException- if an error occurs accessing the database.
-
setTime
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 parametertheTime- the Time value to settheCalendar- the Calendar to use in the conversion operation- Throws:
SQLException- if an error occurs accessing the database.
-
setTimestamp
Sets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Timestamp, converting it to an SQLTIMESTAMPvalue using the system defaultCalendar.- 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.- See Also:
Calendar,Timestamp
-
setTimestamp
void setTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar) throws SQLExceptionSets the value of the specified parameter in theRowSetcommand to a suppliedjava.sql.Timestamp, converting it to an SQLTIMESTAMPvalue using a suppliedCalendar.- 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- theCalendarto use in the conversion operation- Throws:
SQLException- if an error occurs accessing the database.- See Also:
Calendar,Timestamp
-
setTimestamp
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 defaultCalendar.- Parameters:
parameterName- name for parametertheTimestamp- the value to which the parameter is set- Throws:
SQLException- if an error occurs accessing the database.
-
setTimestamp
void setTimestamp(String parameterName, Timestamp theTimestamp, Calendar theCalendar) throws SQLExceptionSets 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 parametertheTimestamp- the value to which the parameter is settheCalendar- the Calendar to use in the conversion operation- Throws:
SQLException- if an error occurs accessing the database.
-
setTransactionIsolation
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_UNCOMMITTEDConnection.TRANSACTION_READ_COMMITTEDConnection.TRANSACTION_REPEATABLE_READConnection.TRANSACTION_SERIALIZABLE
- Throws:
SQLException- if an error occurs accessing the database.- See Also:
Connection
-
setType
Sets the type of thisRowSet. By default, the type is non-scrollable.- Parameters:
type- the type for theRowSet. One of:ResultSet.TYPE_FORWARD_ONLYResultSet.TYPE_SCROLL_INSENSITIVEResultSet.TYPE_SCROLL_SENSITIVE
- Throws:
SQLException- if an error occurs accessing the database.
-
setTypeMap
Sets the mapping of SQL User Defined Types (UDTs) to Java classes. The Java classes must all implement theSQLDatainterface.- 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.
-
setUrl
Sets the URL used by thisRowSetto access the database via aDriverManager. The URL is optional - an alternative is to use a database name to create a connection.- Parameters:
theURL- the URL for the database. Can benull.- Throws:
SQLException- if an error occurs accessing the database.
-
setURL
Sets the URL used by this RowSet to access the database via aDriverManager. 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.
-
setUsername
Sets theUsernameproperty for theRowSet, 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.
-