RowSet object with its basic functionality.
The basic functions include having properties and sending event notifications,
which all JavaBeans components must implement.
BaseRowSet class provides the core functionality
for all RowSet implementations,
and all standard implementations may use this class in combination with
one or more RowSet interfaces in order to provide a standard
vendor-specific implementation. To clarify, all implementations must implement
at least one of the RowSet interfaces (JdbcRowSet,
CachedRowSet, JoinRowSet, FilteredRowSet,
or WebRowSet). This means that any implementation that extends
the BaseRowSet class must also implement one of the RowSet
interfaces.
The BaseRowSet class provides the following:
RowSet object's command
RowSet implementation does and how it gets
its data. For example,
rowsets that get their data from a ResultSet object need to
set the properties that are required for making a database connection.
If a RowSet object uses the DriverManager facility to make a
connection, it needs to set a property for the JDBC URL that identifies the
appropriate driver, and it needs to set the properties that give the
user name and password.
If, on the other hand, the rowset uses a DataSource object
to make the connection, which is the preferred method, it does not need to
set the property for the JDBC URL. Instead, it needs to set the property
for the logical name of the data source along with the properties for
the user name and password.Note
In order to use a DataSource object for making a
connection, the DataSource object must have been registered
with a naming service that uses the Java Naming and Directory
Interface (JNDI) API. This registration
is usually done by a person acting in the capacity of a system administrator.
ResultSet object. This query is the command that is set
for the RowSet object's command property. The rowset populates itself with data by reading the
data from the ResultSet object into itself. If the query
contains placeholders for values to be set, the BaseRowSet setter methods
are used to set these values. All setter methods allow these values to be set
to null if required.
The following code fragment illustrates how the
CachedRowSet
object crs might have its command property set. Note that if a
tool is used to set properties, this is the code that the tool would use.
crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
"WHERE CREDIT_LIMIT > ? AND REGION = ?");
In this example, the values for CREDIT_LIMIT and
REGION are placeholder parameters, which are indicated with a
question mark (?). The first question mark is placeholder parameter number
1, the second question mark is placeholder parameter number
2, and so on. Any placeholder parameters must be set with
values before the query can be executed. To set these
placeholder parameters, the BaseRowSet class provides a set of setter
methods, similar to those provided by the PreparedStatement
interface, for setting values of each data type. A RowSet object stores the
parameter values internally, and its execute method uses them internally
to set values for the placeholder parameters
before it sends the command to the DBMS to be executed.
The following code fragment demonstrates setting the two parameters in the query from the previous example.
crs.setInt(1, 5000);
crs.setString(2, "West");
If the execute method is called at this point, the query
sent to the DBMS will be:
"SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
"WHERE CREDIT_LIMIT > 5000 AND REGION = 'West'"
NOTE: Setting Array, Clob, Blob and
Ref objects as a command parameter, stores these values as
SerialArray, SerialClob, SerialBlob
and SerialRef objects respectively.
Note
The BaseRowSet class provides two kinds of setter methods,
those that set properties and those that set placeholder parameters. The setter
methods discussed in this section are those that set placeholder parameters.
The placeholder parameters set with the BaseRowSet setter methods
are stored as objects in an internal Hashtable object.
Primitives are stored as their Object type. For example, byte
is stored as Byte object, and int is stored as
an Integer object.
When the method execute is called, the values in the
Hashtable object are substituted for the appropriate placeholder
parameters in the command.
A call to the method getParams returns the values stored in the
Hashtable object as an array of Object instances.
An element in this array may be a simple Object instance or an
array (which is a type of Object). The particular setter method used
determines whether an element in this array is an Object or an array.
The majority of methods for setting placeholder parameters take two parameters,
with the first parameter
indicating which placeholder parameter is to be set, and the second parameter
giving the value to be set. Methods such as setInt,
setString, setBoolean, and setLong fall into
this category. After these methods have been called, a call to the method
getParams will return an array with the values that have been set. Each
element in the array is an Object instance representing the
values that have been set. The order of these values in the array is determined by the
int (the first parameter) passed to the setter method. The values in the
array are the values (the second parameter) passed to the setter method.
In other words, the first element in the array is the value
to be set for the first placeholder parameter in the RowSet object's
command. The second element is the value to
be set for the second placeholder parameter, and so on.
Several setter methods send the driver and DBMS information beyond the value to be set.
When the method getParams is called after one of these setter methods has
been used, the elements in the array will themselves be arrays to accommodate the
additional information. In this category, the method setNull is a special case
because one version takes only
two parameters (setNull(int parameterIndex, int SqlType)). Nevertheless,
it requires
an array to contain the information that will be passed to the driver and DBMS. The first
element in this array is the value to be set, which is null, and the
second element is the int supplied for sqlType, which
indicates the type of SQL value that is being set to null. This information
is needed by some DBMSs and is therefore required in order to ensure that applications
are portable.
The other version is intended to be used when the value to be set to null
is a user-defined type. It takes three parameters
(setNull(int parameterIndex, int sqlType, String typeName)) and also
requires an array to contain the information to be passed to the driver and DBMS.
The first two elements in this array are the same as for the first version of
setNull. The third element, typeName, gives the SQL name of
the user-defined type. As is true with the other setter methods, the number of the
placeholder parameter to be set is indicated by an element's position in the array
returned by getParams. So, for example, if the parameter
supplied to setNull is 2, the second element in the array
returned by getParams will be an array of two or three elements.
Some methods, such as setObject and setDate have versions
that take more than two parameters, with the extra parameters giving information
to the driver or the DBMS. For example, the methods setDate,
setTime, and setTimestamp can take a Calendar
object as their third parameter. If the DBMS does not store time zone information,
the driver uses the Calendar object to construct the Date,
Time, or Timestamp object being set. As is true with other
methods that provide additional information, the element in the array returned
by getParams is an array instead of a simple Object instance.
The methods setAsciiStream, setBinaryStream,
setCharacterStream, and setUnicodeStream (which is
deprecated, so applications should use getCharacterStream instead)
take three parameters, so for them, the element in the array returned by
getParams is also an array. What is different about these setter
methods is that in addition to the information provided by parameters, the array contains
one of the BaseRowSet constants indicating the type of stream being set.
Note
The method getParams is called internally by
RowSet implementations extending this class; it is not normally called by an
application programmer directly.
BaseRowSet class provides the event notification
mechanism for rowsets. It contains the field
listeners, methods for adding and removing listeners, and
methods for notifying listeners of changes.
A listener is an object that has implemented the RowSetListener interface.
If it has been added to a RowSet object's list of listeners, it will be notified
when an event occurs on that RowSet object. Each listener's
implementation of the RowSetListener methods defines what that object
will do when it is notified that an event has occurred.
There are three possible events for a RowSet object:
RowSet object are changed
The BaseRowSet method used for the notification indicates the
type of event that has occurred. For example, the method
notifyRowChanged indicates that a row has been updated,
deleted, or inserted. Each of the notification methods creates a
RowSetEvent object, which is supplied to the listener in order to
identify the RowSet object on which the event occurred.
What the listener does with this information, which may be nothing, depends on how it was
implemented.
BaseRowSet object is initialized with many starting values.
The following is true of a default RowSet instance that extends
the BaseRowSet class:
RowSet object's command.
Note
This
limit applies only to columns that hold values of the
following types: BINARY, VARBINARY,
LONGVARBINARY, CHAR, VARCHAR,
and LONGVARCHAR.
null.
Vector object for storing the values set
for the placeholder parameters in the RowSet object's command.
If other values are desired, an application must set the property values
explicitly. For example, the following line of code sets the maximum number
of rows for the CachedRowSet object crs to 500.
crs.setMaxRows(500);Methods implemented in extensions of this
BaseRowSet class must throw an
SQLException object for any violation of the defined assertions. Also, if the
extending class overrides and reimplements any BaseRowSet method and encounters
connectivity or underlying data source issues, that method may in addition throw an
SQLException object for that reason.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ASCII_STREAM_PARAM
A constant indicating to a |
| protected InputStream | asciiStream
The |
| public static final int | BINARY_STREAM_PARAM
A constant indicating to a |
| protected InputStream | binaryStream
The |
| protected Reader | charStream
The |
| private String | command
The query that will be sent to the DBMS for execution when the
method |
| private int | concurrency
A constant indicating the concurrency of this JDBC |
| private String | dataSource
The logical name of the data source that the reader/writer should use
in order to retrieve a |
| private boolean | escapeProcessing
A |
| private int | fetchDir
A constant used as a hint to the driver that indicates the direction in
which data from this JDBC |
| private int | fetchSize
A hint to the driver that indicates the expected number of rows
in this JDBC |
| private int | isolation
A constant indicating the isolation level of the connection
for this JDBC |
| private Vector | listeners
A |
| private Map | map
The |
| private int | maxFieldSize
The maximum field size the reader should read. |
| private int | maxRows
The maximum number of rows the reader should read. |
| private Hashtable | params
A |
| private transient String | password
The password the reader, writer, or both supply to the method
|
| private int | queryTimeout
The maximum number of seconds the driver will wait for a command to execute. |
| private boolean | readOnly
A |
| private int | rowSetType
A constant indicating the type of this JDBC |
| pack-priv static final long | |
| private boolean | showDeleted
A |
| public static final int | UNICODE_STREAM_PARAM
A constant indicating to a |
| protected InputStream | unicodeStream
The |
| private String | URL
The JDBC URL the reader, writer, or both supply to the method
|
| private transient String | username
The user name the reader, writer, or both supply to the method
|
| Access | Constructor and Description |
|---|---|
| public | BaseRowSet()
Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | addRowSetListener(RowSetListener
an object that has implemented the
listener)javax.sql.RowSetListener interface and wants to be notified
of any events that occur on this RowSet object; May be
null.The listener will be notified whenever an event occurs on this |
| private void | |
| private void | checkParamIndex(int
an idx)int indicating which parameter is to be
checked; the first parameter is 1Checks the given index to see whether it is less than |
| public void | clearParameters()
Clears all of the current parameter values in this |
| public String | Returns: theString that is the value for this
RowSet object's command property;
may be nullRetrieves the SQL query that is the command for this
|
| public int | Returns: the concurrency type for thisRowSet
object, which must be one of the following:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEReturns the concurrency for this |
| public String | Returns: aString object that identifies the
DataSource object to be used for making a
connection; if no logical name has been set, null
is returned.Returns the logical name that when supplied to a naming service
that uses the Java Naming and Directory Interface (JNDI) API, will
retrieve a |
| public boolean | Returns: true if escape processing is turned on;
false otherwiseAscertains whether escape processing is enabled for this
|
| public int | Returns: one ofResultSet.FETCH_FORWARD,
ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWNRetrieves this |
| public int | Returns: the number of rows suggested as the fetch size when thisRowSet object
needs more rows from the databaseReturns the fetch size for this |
| public int | Returns: anint indicating the current maximum column size
limit; zero means that there is no limitRetrieves the maximum number of bytes that can be used for a column
value in this |
| public int | Returns: anint indicating the current maximum number of
rows; zero means that there is no limitRetrieves the maximum number of rows that this |
| public Object[] | Returns: an array ofObject instances that includes the
parameter values that may be set in this RowSet object's
command; an empty array if no parameters have been setRetrieves an array containing the parameter values (both Objects and
primitives) that have been set for this
|
| public String | Returns: theString object that represents the password
that must be supplied to the database to create a connectionReturns the password used to create a database connection for this
|
| public int | Returns: the current query timeout limit in seconds; zero means that there is no limitRetrieves the maximum number of seconds the driver will wait for a query to execute. |
| public boolean | Returns: true if deleted rows are visible;
false otherwiseRetrieves a |
| public int | Returns: one of the following constants:Connection.TRANSACTION_NONE,
Connection.TRANSACTION_READ_UNCOMMITTED,
Connection.TRANSACTION_READ_COMMITTED,
Connection.TRANSACTION_REPEATABLE_READ, or
Connection.TRANSACTION_SERIALIZABLEReturns the transaction isolation property for this
|
| public int | Returns: the type of this JDBCRowSet
object, which must be one of the following:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEReturns the type of this |
| public Map | Returns: thejava.util.Map object that is the type map
for this RowSet object's connectionRetrieves the type map associated with the |
| public String | Returns: aString object that contains the JDBC URL
used to establish the connection for this RowSet
object; may be null (default value) if not setRetrieves the JDBC URL that this |
| public String | Returns: theString object containing the user name that
is supplied to the data source to create a connection; may be
null (default value) if not setReturns the user name used to create a database connection. |
| protected void | initParams()
Performs the necessary internal configurations and initializations
to allow any JDBC |
| public boolean | Returns: true if this RowSet object
cannot be updated; false otherwiseReturns a |
| protected void | notifyCursorMoved()
Notifies all of the listeners registered with this
|
| protected void | notifyRowChanged()
Notifies all of the listeners registered with this |
| protected void | notifyRowSetChanged()
Notifies all of the listeners registered with this |
| public void | removeRowSetListener(RowSetListener
a listener)RowSetListener object that is on the list
of listeners for this RowSet objectRemoves the designated object from this |
| public void | setArray(int
the ordinal number of the placeholder parameter
in this parameterIndex, Array RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greateran array)Array object representing an SQL
ARRAY value; cannot be null. The Array object
passed to this method must return a non-null Object for all
getArray() method calls. A null value will cause a
SQLException to be thrown.Sets the designated parameter to an |
| public void | setAsciiStream(int
the ordinal number of the placeholder parameter
in this parameterIndex, InputStream RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe Java input stream that contains the ASCII parameter value x, int the number of bytes in the stream. This is the number of bytes
the driver will send to the DBMS; lengths of 0 or less are
are undefined but will cause an invalid length exception to be
thrown in the underlying JDBC driver. length)Sets the designated parameter to the given
|
| public void | setAsciiStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the Java input stream that contains the ASCII parameter value x)Sets the designated parameter in this |
| public void | setAsciiStream(String
the name of the parameter parameterName, InputStream the Java input stream that contains the ASCII parameter value x, int the number of bytes in the stream length)Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setAsciiStream(String
the name of the parameter parameterName, InputStream the Java input stream that contains the ASCII parameter value x)Sets the designated parameter to the given input stream. |
| public void | setBigDecimal(int
the ordinal number of the placeholder parameter
in this parameterIndex, BigDecimal RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given
|
| public void | setBigDecimal(String
the name of the parameter parameterName, BigDecimal the parameter value x)Sets the designated parameter to the given
|
| public void | setBinaryStream(int
the ordinal number of the placeholder parameter
in this parameterIndex, InputStream RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe input stream that contains the binary value to be set x, int the number of bytes in the stream; lengths of 0 or less are
are undefined but will cause an invalid length exception to be
thrown in the underlying JDBC driver. length)Sets the designated parameter to the given |
| public void | setBinaryStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the binary parameter value x)Sets the designated parameter in this |
| public void | setBinaryStream(String
the name of the parameter parameterName, InputStream the java input stream which contains the binary parameter value x, int the number of bytes in the stream length)Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setBinaryStream(String
the name of the parameter parameterName, InputStream the java input stream which contains the binary parameter value x)Sets the designated parameter to the given input stream. |
| public void | setBlob(int
the ordinal number of the placeholder parameter
in this parameterIndex, Blob RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x)Blob object representing an SQL
BLOB valueSets the designated parameter to the given |
| public void | setBlob(int
index of the first parameter is 1,
the second is 2, ... parameterIndex, InputStream An object that contains the data to set the parameter
value to. inputStream, long the number of bytes in the parameter data. length)Sets the designated parameter to a |
| public void | setBlob(int
index of the first parameter is 1,
the second is 2, ... parameterIndex, InputStream An object that contains the data to set the parameter
value to. inputStream)Sets the designated parameter to a |
| public void | setBlob(String
the name of the parameter to be set
the second is 2, ... parameterName, InputStream An object that contains the data to set the parameter
value to. inputStream, long the number of bytes in the parameter data. length)Sets the designated parameter to a |
| public void | |
| public void | setBlob(String
the name of the parameter parameterName, InputStream An object that contains the data to set the parameter
value to. inputStream)Sets the designated parameter to a |
| public void | setBoolean(int
the ordinal number of the placeholder parameter
in this parameterIndex, boolean RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | setBoolean(String
the name of the parameter parameterName, boolean the parameter value x)Sets the designated parameter to the given Java |
| public void | setByte(int
the ordinal number of the placeholder parameter
in this parameterIndex, byte RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | |
| public void | setBytes(int
the ordinal number of the placeholder parameter
in this parameterIndex, byte[] RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given array of bytes. |
| public void | |
| public void | setCharacterStream(int
the ordinal number of the placeholder parameter
in this parameterIndex, Reader RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe reader, int Reader object that contains the
Unicode datathe number of characters in the stream; lengths of 0 or
less are undefined but will cause an invalid length exception to
be thrown in the underlying JDBC driver. length)Sets the designated parameter to the given |
| public void | setCharacterStream(int
the first parameter is 1, the second is 2, ... parameterIndex, Reader the reader)java.io.Reader object that contains the
Unicode dataSets the designated parameter in this |
| public void | setCharacterStream(String
the name of the parameter parameterName, Reader the reader, int java.io.Reader object that
contains the UNICODE data used as the designated parameterthe number of characters in the stream length)Sets the designated parameter to the given |
| public void | setCharacterStream(String
the name of the parameter parameterName, Reader the reader)java.io.Reader object that contains the
Unicode dataSets the designated parameter to the given |
| public void | setClob(int
the ordinal number of the placeholder parameter
in this parameterIndex, Clob RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x)Clob object representing an SQL
CLOB value; cannot be nullSets the designated parameter to the given |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setCommand(String
a cmd)String object containing an SQL query
that will be set as this RowSet object's command
property; may be null but may not be an empty stringSets this |
| public void | setConcurrency(int
one of the following constants:
concurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLESets the concurrency for this |
| public void | setDataSourceName(String
a name)String object with the name that can be supplied
to a naming service based on JNDI technology to retrieve the
DataSource object that can be used to get a connection;
may be null but must not be an empty stringSets the |
| public void | |
| public void | setDate(int
the ordinal number of the placeholder parameter
in this parameterIndex, Date RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x, Calendar java.sql.Date object representing an SQL
DATE valuea cal)java.util.Calendar object to use when
when constructing the dateSets the designated parameter to the given |
| public void | |
| public void | |
| public void | setDouble(int
the ordinal number of the placeholder parameter
in this parameterIndex, double RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | |
| public void | setEscapeProcessing(boolean
true to enable escape processing;
false to disable itSets to the given |
| public void | setFetchDirection(int
one of direction)ResultSet.FETCH_FORWARD,
ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWNGives the driver a performance hint as to the direction in
which the rows in this |
| public void | setFetchSize(int
the number of rows to fetch; rows)0 to let the
driver decide what the best fetch size is; must not be less
than 0 or more than the maximum number of rows
allowed for this RowSet object (the number returned
by a call to the method getMaxRows)Sets the fetch size for this |
| public void | setFloat(int
the ordinal number of the placeholder parameter
in this parameterIndex, float RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | |
| public void | setInt(int
the ordinal number of the placeholder parameter
in this parameterIndex, int RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to an |
| public void | |
| public void | setLong(int
the ordinal number of the placeholder parameter
in this parameterIndex, long RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | |
| public void | setMaxFieldSize(int
an max)int indicating the new maximum column size
limit; zero means that there is no limitSets the maximum number of bytes that can be used for a column
value in this |
| public void | setMaxRows(int
an max)int indicating the current maximum number
of rows; zero means that there is no limitSets the maximum number of rows that this |
| public void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... parameterIndex, Reader the parameter value value)Sets the designated parameter in this |
| public void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... parameterIndex, Reader the parameter value value, long the number of characters in the parameter data. length)Sets the designated parameter to a |
| public void | setNCharacterStream(String
the name of the column to be set parameterName, Reader the parameter value value, long the number of characters in the parameter data. length)Sets the designated parameter to a |
| public void | setNCharacterStream(String
the name of the parameter parameterName, Reader the parameter value value)Sets the designated parameter to a |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setNString(int
of the first parameter is 1, the second is 2, ... parameterIndex, String the parameter value value)Sets the designated parameter to the given |
| public void | setNString(String
the name of the column to be set parameterName, String the parameter value value)Sets the designated parameter to the given |
| public void | setNull(int
the ordinal number of the placeholder parameter
in this parameterIndex, int RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greateran sqlType)int that is one of the SQL type codes
defined in the class java.. If a non-standard
sqlType is supplied, this method will not throw a
SQLException. This allows implicit support for
non-standard SQL types.Sets the designated parameter to SQL |
| public void | setNull(int
the ordinal number of the placeholder parameter
in this parameterIndex, int RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera value from sqlType, String java.sql.Typesthe fully qualified name of an SQL user-defined type,
which is ignored if the parameter is not a user-defined
type or typeName)REF valueSets the designated parameter to SQL |
| public void | |
| public void | |
| public void | setObject(int
the ordinal number of the placeholder parameter
in this parameterIndex, Object RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe x, int Object containing the input parameter value;
must be an Object typethe SQL type (as defined in targetSqlType, int java.sql.Types)
to be sent to the database. The scale argument may
further qualify this type. If a non-standard targetSqlType
is supplied, this method will not throw a SQLException.
This allows implicit support for non-standard SQL types.for the types scale)java.sql.Types.DECIMAL and
java.sql.Types.NUMERIC, this is the number
of digits after the decimal point. For all other types, this
value will be ignored.Sets the designated parameter to an |
| public void | setObject(int
the ordinal number of the placeholder parameter
in this parameterIndex, Object RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe x, int Object containing the input parameter value;
must be an Object typethe SQL type (as defined in targetSqlType)java.sql.Types)
to be sent to the database. If a non-standard targetSqlType
is supplied, this method will not throw a SQLException.
This allows implicit support for non-standard SQL types.Sets the value of the designated parameter with the given
|
| public void | setObject(int
the ordinal number of the placeholder parameter
in this parameterIndex, Object RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe object containing the input parameter value x)Sets the designated parameter to an |
| public void | setObject(String
the name of the parameter parameterName, Object the object containing the input parameter value x, int the SQL type (as defined in java.sql.Types) to be
sent to the database. The scale argument may further qualify this type. targetSqlType, int for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
this is the number of digits after the decimal point. For all other
types, this value will be ignored. scale)Sets the value of the designated parameter with the given object. |
| public void | |
| public void | |
| public void | setPassword(String
the pass)String object that represents the password
that is supplied to the database to create a connection. It may be
null.Sets the password used to create a database connection for this
|
| public void | setQueryTimeout(int
the new query time-out limit in seconds; zero means that
there is no limit; must not be less than zero seconds)Sets to the given number the maximum number of seconds the driver will wait for a query to execute. |
| public void | setReadOnly(boolean
true to indicate that this
RowSet object is read-only;
false to indicate that it is updatableSets this |
| public void | setRef(int
the ordinal number of the placeholder parameter
in this parameterIndex, Ref RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera ref)Ref object representing an SQL REF
value; cannot be nullSets the designated parameter to the given |
| public void | |
| public void | |
| public void | setShort(int
the ordinal number of the placeholder parameter
in this parameterIndex, short RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe parameter value x)Sets the designated parameter to the given |
| public void | |
| public void | setShowDeleted(boolean
true if deleted rows should be shown;
false otherwiseSets the property |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setTime(int
the ordinal number of the placeholder parameter
in this parameterIndex, Time RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x)java.sql.Time object, which is to be set as the value
for placeholder parameter parameterIndexSets the designated parameter to the given |
| public void | setTime(int
the ordinal number of the placeholder parameter
in this parameterIndex, Time RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x, Calendar java.sql.Time objectthe cal)java.util.Calendar object the driver can use to
construct the timeSets the designated parameter to the given |
| public void | |
| public void | |
| public void | setTimestamp(int
the ordinal number of the placeholder parameter
in this parameterIndex, Timestamp RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x)java.sql.Timestamp objectSets the designated parameter to the given
|
| public void | setTimestamp(int
the ordinal number of the placeholder parameter
in this parameterIndex, Timestamp RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greatera x, Calendar java.sql.Timestamp objectthe cal)java.util.Calendar object the driver can use to
construct the timestampSets the designated parameter to the given
|
| public void | setTimestamp(String
the name of the parameter parameterName, Timestamp the parameter value x)Sets the designated parameter to the given |
| public void | setTimestamp(String
the name of the parameter parameterName, Timestamp the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the timestampSets the designated parameter to the given |
| public void | setTransactionIsolation(int
one of the following constants, listed in ascending order:
level)Connection.TRANSACTION_NONE,
Connection.TRANSACTION_READ_UNCOMMITTED,
Connection.TRANSACTION_READ_COMMITTED,
Connection.TRANSACTION_REPEATABLE_READ, or
Connection.TRANSACTION_SERIALIZABLESets the transaction isolation property for this JDBC |
| public void | setType(int
one of the following constants:
type)ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVESets the type for this |
| public void | setTypeMap(Map<String, Class<?>>
a map)java.util.Map object that contains the
mapping from SQL type names for user defined types (UDT) to classes in
the Java programming language. Each entry in the Map
object consists of the fully qualified SQL name of a UDT and the
Class object for the SQLData implementation
of that UDT. May be null.Installs the given |
| public void | setUnicodeStream(int
the ordinal number of the placeholder parameter
in this parameterIndex, InputStream RowSet object's command that is to be set.
The first parameter is 1, the second is 2, and so on; must be
1 or greaterthe x, int java.io.InputStream object that contains the
UNICODE parameter valuethe number of bytes in the input stream length)
Deprecated
getCharacterStream should be used in its place
Sets the designated parameter to the given
|
| public void | setUrl(String
a url)String object that contains the JDBC URL
that will be used to establish the connection to a database for this
RowSet object; may be null but must not
be an empty stringSets the Url property for this |
| public void | |
| public void | setUsername(String
the name)String object containing the user name that
is supplied to the data source to create a connection. It may be null.Sets the username property for this |