Methods Summary |
---|
public void | addRowSetListener(javax.sql.RowSetListener theListener)Registers the supplied {@link RowSetListener} with this {@code RowSet}.
Once registered, the {@link RowSetListener} is notified of events
generated by the {@code RowSet}.
|
public void | clearParameters()Clears the parameters previously set for this {@code RowSet}.
The {@code RowSet} object retains its value until either a new value for
a parameter is set or its value is actively reset. {@code
clearParameters} provides a facility to clear the values for all
parameters with one method call.
|
public void | execute()Fetches data for this {@code RowSet} from the database. If successful,
any existing data for the {@code RowSet} is discarded and its metadata is
overwritten.
Data is retrieved connecting to the database and executing an
according SQL statement. This requires some or all of the following
properties to be set: URL, database name, user name, password,
transaction isolation, type map; plus some or all of the properties:
command, read only, maximum field size, maximum rows, escape processing,
and query timeout.
The {@code RowSet} may use a {@code RowSetReader} to access the database
it will then invoke the {@link RowSetReader#readData} method on the
reader to fetch the data. When the new data is fetched all the listeners
are notified to take appropriate measures.
|
public java.lang.String | getCommand()Gets the {@code RowSet}'s command property.
|
public java.lang.String | getDataSourceName()Gets the ODBC Data Source Name property associated with this {@code
RowSet}. The database name can be used to find a {@link DataSource}
which has been registered with a naming service - the {@link DataSource}
can then be used to create a connection to the database.
|
public boolean | getEscapeProcessing()Reports if escape processing is enabled for this {@code RowSet}. If
escape processing is on, the driver performs a substitution of the escape
syntax with the applicable code before sending an SQL command to the
database. The default value for escape processing is {@code true}.
|
public int | getMaxFieldSize()Gets the maximum number of bytes that can be returned for column values
which are of type {@code BINARY}, {@code VARBINARY}, {@code
LONGVARBINARYBINARY}, {@code CHAR}, {@code VARCHAR}, or {@code
LONGVARCHAR}. Excess data is silently discarded if the number is
exceeded.
|
public int | getMaxRows()Gets the maximum number of rows for this {@code RowSet}. Excess rows are
discarded silently if the limit is exceeded.
|
public java.lang.String | getPassword()Gets the value of the password property for this {@code RowSet}. This
property is used when a connection to the database is established.
Therefore it should be set prior to invoking the {@link #execute} method.
|
public int | getQueryTimeout()Gets the timeout for the driver when a query operation is executed. If a
query takes longer than the timeout then a {@code SQLException} is
thrown.
|
public int | getTransactionIsolation()Gets the transaction isolation level property set for this
{@code RowSet}. The transaction isolation level defines the
policy implemented on the database for maintaining the data
values consistent.
|
public java.util.Map | getTypeMap()Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes
for this {@code RowSet}, if applicable.
|
public java.lang.String | getUrl()Gets the URL property value for this {@code RowSet}. If there is no
{@code DataSource} object specified, the {@code RowSet} uses the URL to
establish a connection to the database. The default value for the URL is
{@code null}.
|
public java.lang.String | getUsername()Gets the value of the {@code username} property for this {@code RowSet}.
The {@code username} is used when establishing a connection to the
database and should be set before the {@code execute} method is invoked.
|
public boolean | isReadOnly()Indicates if this {@code RowSet} is read-only.
|
public void | removeRowSetListener(javax.sql.RowSetListener theListener)Removes a specified {@link RowSetListener} object from the set of
listeners which will be notified of events by this {@code RowSet}.
|
public void | setArray(int parameterIndex, java.sql.Array theArray)Sets the specified {@code ARRAY} parameter in the {@code RowSet} command
with the supplied {@code java.sql.Array} value.
|
public void | setAsciiStream(int parameterIndex, java.io.InputStream theInputStream, int length)Sets the value of the specified parameter in the {@code RowSet} command
with the ASCII data in the supplied {@code java.io.InputStream} value.
Data is read from the {@code InputStream} until end-of-file is reached.
|
public void | setBigDecimal(int parameterIndex, java.math.BigDecimal theBigDecimal)Sets the value of the specified SQL {@code NUMERIC} parameter in the
{@code RowSet} command with the data in the supplied {@code
java.math.BigDecimal} value.
|
public void | setBinaryStream(int parameterIndex, java.io.InputStream theInputStream, int length)Sets the value of the specified parameter in the {@code RowSet} command
to the binary data in the supplied input stream. Data is read from the
input stream until end-of-file is reached.
|
public void | setBlob(int parameterIndex, java.sql.Blob theBlob)Sets the value of the specified parameter in the {@code RowSet} command
to the supplied {@code Blob} value.
|
public void | setBoolean(int parameterIndex, boolean theBoolean)Sets the value of the specified parameter in the {@code RowSet} command
to the supplied boolean.
|
public void | setByte(int parameterIndex, byte theByte)Sets the value of the specified parameter in the {@code RowSet} command
to the supplied byte value.
|
public void | setBytes(int parameterIndex, byte[] theByteArray)Sets the value of the specified parameter in the {@code RowSet} command
to the supplied byte array value.
|
public void | setCharacterStream(int parameterIndex, java.io.Reader theReader, int length)Sets the value of the specified parameter in the {@code RowSet} command
to the sequence of Unicode characters carried by the supplied {@code
java.io.Reader}.
|
public void | setClob(int parameterIndex, java.sql.Clob theClob)Sets the value of the specified parameter in the {@code RowSet} command
with the value of a supplied {@code java.sql.Clob}.
|
public void | setCommand(java.lang.String cmd)Sets the Command property for this {@code RowSet} - the command is an SQL
query which runs when the {@code execute} method is invoked. This
property is optional for databases that do not support commands.
|
public void | setConcurrency(int concurrency)Sets the concurrency property of this {@code RowSet}. The default value
is {@code ResultSet.CONCUR_READ_ONLY}.
|
public void | setDataSourceName(java.lang.String name)Sets the database name property for the {@code RowSet}.
The database name can be used to find a {@link DataSource} which has been
registered with a naming service - the {@link DataSource} can then be
used to create a connection to the database.
|
public void | setDate(int parameterIndex, java.sql.Date theDate)Sets the value of the specified parameter in the {@code RowSet} command
with the value of a supplied {@code java.sql.Date}.
|
public void | setDate(int parameterIndex, java.sql.Date theDate, java.util.Calendar theCalendar)Sets the value of the specified parameter in the {@code RowSet} command
with the value of a supplied {@code java.sql.Date}, where the conversion
of the date to an SQL {@code DATE} value is calculated using a supplied
{@code Calendar}.
|
public void | setDouble(int parameterIndex, double theDouble)Sets the value of the specified parameter in the {@code RowSet} command
with the supplied {@code double}.
|
public void | setEscapeProcessing(boolean enable)Sets the escape processing status for this {@code RowSet}. If escape
processing is on, the driver performs a substitution of the escape syntax
with the applicable code before sending an SQL command to the database.
The default value for escape processing is {@code true}.
|
public void | setFloat(int parameterIndex, float theFloat)Sets the value of the specified parameter in the {@code RowSet} command
with the supplied {@code float}.
|
public void | setInt(int parameterIndex, int theInteger)Sets the value of the specified parameter in the {@code RowSet} command
with the supplied {@code integer}.
|
public void | setLong(int parameterIndex, long theLong)Sets the value of the specified parameter in the {@code RowSet} command
with the supplied {@code long}.
|
public void | setMaxFieldSize(int max)Sets the maximum number of bytes which can be returned for a column value
where the column type is one of {@code BINARY}, {@code VARBINARY},
{@code LONGVARBINARYBINARY}, {@code CHAR}, {@code VARCHAR}, or {@code
LONGVARCHAR}. Data which exceeds this limit is silently discarded. For
portability, a value greater than 256 is recommended.
|
public void | setMaxRows(int max)Sets the maximum number of rows which can be held by the {@code RowSet}.
Any additional rows are silently discarded.
|
public void | setNull(int parameterIndex, int sqlType)Sets the value of the specified parameter in the {@code RowSet} command
to SQL {@code NULL}.
|
public void | setNull(int parameterIndex, int sqlType, java.lang.String typeName)Sets the value of the specified parameter in the {@code RowSet} command
to SQL {@code NULL}. This form of the {@code setNull} method should be
used for User Defined Types and {@code REF} parameters.
|
public void | setObject(int parameterIndex, java.lang.Object theObject)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied Java object.
The JDBC specification provides a standard mapping for Java objects to
SQL data types. Database specific types can be mapped by JDBC driver
specific Java types.
|
public void | setObject(int parameterIndex, java.lang.Object theObject, int targetSqlType)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied Java object.
|
public void | setObject(int parameterIndex, java.lang.Object theObject, int targetSqlType, int scale)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied Java object.
|
public void | setPassword(java.lang.String password)Sets the database Password for this {@code RowSet}. This property is used
when a connection to the database is established. Therefore it should be
set prior to invoking the {@link #execute} method.
|
public void | setQueryTimeout(int seconds)Gets the timeout for the driver when a query operation is executed. If a
query takes longer than the timeout, a {@code SQLException} is thrown.
|
public void | setReadOnly(boolean readOnly)Sets whether the {@code RowSet} is read-only or updatable.
|
public void | setRef(int parameterIndex, java.sql.Ref theRef)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code java.sql.Ref}. This is sent to the database as an
SQL {@code REF} value.
|
public void | setShort(int parameterIndex, short theShort)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code short integer}.
|
public void | setString(int parameterIndex, java.lang.String theString)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code String}. The string is placed into the database as a
{@code VARCHAR} or {@code LONGVARCHAR} SQL value, depending on the
database limits for the length of {@code VARCHAR} values.
|
public void | setTime(int parameterIndex, java.sql.Time theTime)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code java.sql.Time}, converting it to an SQL {@code TIME}
value using the system default {@code Calendar}.
|
public void | setTime(int parameterIndex, java.sql.Time theTime, java.util.Calendar theCalendar)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code java.sql.Time}, converting it to an SQL {@code TIME}
value using a supplied {@code Calendar}.
|
public void | setTimestamp(int parameterIndex, java.sql.Timestamp theTimestamp)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code java.sql.Timestamp}, converting it to an SQL {@code
TIMESTAMP} value using the system default {@code Calendar}.
|
public void | setTimestamp(int parameterIndex, java.sql.Timestamp theTimestamp, java.util.Calendar theCalendar)Sets the value of the specified parameter in the {@code RowSet} command
to a supplied {@code java.sql.Timestamp}, converting it to an SQL {@code
TIMESTAMP} value using a supplied {@code Calendar}.
|
public void | setTransactionIsolation(int level)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.
|
public void | setType(int type)Sets the type of this {@code RowSet}. By default, the type is
non-scrollable.
|
public void | setTypeMap(java.util.Map theTypeMap)Sets the mapping of SQL User Defined Types (UDTs) to Java classes. The
Java classes must all implement the {@link java.sql.SQLData SQLData}
interface.
|
public void | setUrl(java.lang.String theURL)Sets the URL used by this {@code RowSet} to access the database via a
{@code DriverManager}. The URL is optional - an alternative is to use a
database name to create a connection.
|
public void | setUsername(java.lang.String theUsername)Sets the {@code Username} property for the {@code RowSet}, used to
authenticate a connection to the database.
|