11.11.JDBC 3 Driver Classes
The OpenLink JDBC driver for JDBC 3.0 has the following classes:
11.11.1.Class BaseRowSet
Synopsis
abstract public class BaseRowSet implements RowSet,Serializable { // Public Constructors public BaseRowSet(); // Public Methods public void close() throws java.sql.SQLException; public void addRowSetListener(javax.sql.RowSetListener rowsetlistener); public void removeRowSetListener(javax.sql.RowSetListener rowsetlistener); public void clearParameters() throws java.sql.SQLException; public String getCommand(); public int getConcurrency() throws java.sql.SQLException; public String getDataSourceName(); public boolean getEscapeProcessing() throws java.sql.SQLException; public int getFetchDirection() throws java.sql.SQLException; public int getFetchSize() throws java.sql.SQLException; public int getMaxFieldSize() throws java.sql.SQLException; public int getMaxRows() throws java.sql.SQLException; public Object[] getParams() throws java.sql.SQLException; public String getPassword(); public int getQueryTimeout() throws java.sql.SQLException; public int getTransactionIsolation(); public int getType() throws java.sql.SQLException; public Map getTypeMap() throws java.sql.SQLException; public String getUrl() throws java.sql.SQLException; public String getUsername(); public boolean isReadOnly(); public void setArray(int parameterIndex, java.sql.Array x) throws java.sql.SQLException; public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException; public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void setBlob(int parameterIndex, java.sql.Blob x) throws java.sql.SQLException; public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException; public void setByte(int parameterIndex, byte x) throws java.sql.SQLException; public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException; public void setCharacterStream(int parameterIndex, java.io.Reader x, int length) throws java.sql.SQLException; public void setClob(int parameterIndex, java.sql.Clob x) throws java.sql.SQLException; public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException; public void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException; public void setDouble(int parameterIndex, double x) throws java.sql.SQLException; public void setFloat(int parameterIndex, float x) throws java.sql.SQLException; public void setInt(int parameterIndex, int x) throws java.sql.SQLException; public void setLong(int parameterIndex, long x) throws java.sql.SQLException; public void setRef(int parameterIndex, java.sql.Ref x) throws java.sql.SQLException; public void setShort(int parameterIndex, short x) throws java.sql.SQLException; public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException; public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException; public void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException; public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException; public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException; public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException; public void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLException; public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException; public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLException; public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLException; public void setCommand(java.lang.String s) throws java.sql.SQLException; public void setConcurrency(int i) throws java.sql.SQLException; public void setDataSourceName(java.lang.String s) throws java.sql.SQLException; public void setEscapeProcessing(boolean flag) throws java.sql.SQLException; public void setFetchDirection(int direction) throws java.sql.SQLException; public void setFetchSize(int rows) throws java.sql.SQLException; public void setMaxFieldSize(int max) throws java.sql.SQLException; public void setMaxRows(int max) throws java.sql.SQLException; public void setQueryTimeout(int seconds) throws java.sql.SQLException; public void setReadOnly(boolean value) throws java.sql.SQLException; public void setPassword(java.lang.String s) throws java.sql.SQLException; public void setTransactionIsolation(int value) throws java.sql.SQLException; public void setType(int value) throws java.sql.SQLException; public void setTypeMap(java.util.Map value) throws java.sql.SQLException; public void setUrl(java.lang.String s) throws java.sql.SQLException; public void setUsername(java.lang.String s) throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.BaseRowSet |
Members
Method addRowSetListener(RowSetListener)
Synopsis: public void addRowSetListener( javax.sql.RowSetListener rowsetlistener);
Parameters |
---|
|
RowSet listener registration. Listeners are notified when an event occurs.
Method clearParameters()
Synopsis: public void clearParameters() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
In general, parameter values remain in force for repeated use of a RowSet. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling clearParameters.
Method getCommand()
Synopsis: public String getCommand();
Get the rowset's command property. The command property contains a command string that can be executed to fill the rowset with data. The default value is null.
Method getConcurrency()
Synopsis: public int getConcurrency() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the rowset concurrency.
Method getDataSourceName()
Synopsis: public String getDataSourceName();
The JNDI name that identifies a JDBC data source. Users should set either the url or data source name properties. The most recent property set is used to get a connection.
Method getEscapeProcessing()
Synopsis: public boolean getEscapeProcessing() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
Method getFetchDirection()
Synopsis: public int getFetchDirection() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Determine the fetch direction.
Method getFetchSize()
Synopsis: public int getFetchSize() throws java.sql.SQLException;
Determine the default fetch size.
Method getMaxFieldSize()
Synopsis: public int getMaxFieldSize() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
Method getMaxRows()
Synopsis: public int getMaxRows() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The maxRows limit is the maximum number of rows that a RowSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Method getParams()
Synopsis: public Object[] getParams() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the parameters that were set on the rowset.
Method getPassword()
Synopsis: public String getPassword();
The password used to create a database connection. The password property is set at runtime before calling execute(). It is not usually part of the serialized state of a rowset object.
Method getQueryTimeout()
Synopsis: public int getQueryTimeout() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.
Method getTransactionIsolation()
Synopsis: public int getTransactionIsolation();
The transaction isolation property contains the JDBC transaction isolation level used.
Method getType()
Synopsis: public int getType() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Return the type of this result set.
Method getTypeMap()
Synopsis: public Map getTypeMap() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the type-map object associated with this rowset. By default, the map returned is empty.
Method getUrl()
Synopsis: public String getUrl() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the url used to create a JDBC connection. The default value is null.
Method getUsername()
Synopsis: public String getUsername();
The username used to create a database connection. The username property is set at runtime before calling execute(). It is not usually part of the serialized state of a rowset object.
Method isReadOnly()
Synopsis: public boolean isReadOnly();
A rowset may be read-only. Attempts to update a read-only rowset will result in an SQLException being thrown. Rowsets are updateable, by default, if updates are possible.
Method removeRowSetListener(RowSetListener)
Synopsis: public void removeRowSetListener( javax.sql.RowSetListener rowsetlistener);
Parameters |
---|
|
RowSet listener deregistration.
Method setArray(int, Array)
Synopsis: public void setArray(int parameterIndex, java.sql.Array x) throws java.sql.SQLException;
Parameters |
---|
|
|
Set an Array parameter.
Method setAsciiStream(int, InputStream, int)
Synopsis: public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Method setBigDecimal(int, BigDecimal)
Synopsis: public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.lang.BigDecimal value.
Method setBinaryStream(int, InputStream, int)
Synopsis: public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Method setBlob(int, Blob)
Synopsis: public void setBlob(int parameterIndex, java.sql.Blob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Set a BLOB parameter.
Method setBoolean(int, boolean)
Synopsis: public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java boolean value.
Method setByte(int, byte)
Synopsis: public void setByte(int parameterIndex, byte x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java byte value.
Method setBytes(int, byte[])
Synopsis: public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java array of bytes.
Method setCharacterStream(int, Reader, int)
Synopsis: public void setCharacterStream(int parameterIndex, java.io.Reader x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Method setClob(int, Clob)
Synopsis: public void setClob(int parameterIndex, java.sql.Clob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Set a CLOB parameter.
Method setCommand(String)
Synopsis: public void setCommand(java.lang.String s) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the rowset's command property. This property is optional. The command property may not be needed when a rowset is produced by a data source that doesn't support commands, such as a spreadsheet.
Method setConcurrency(int)
Synopsis: public void setConcurrency(int i) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the rowset concurrency.
Method setDataSourceName(String)
Synopsis: public void setDataSourceName(java.lang.String s) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the data source name.
Method setDate(int, Date)
Synopsis: public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Date value.
Method setDate(int, Date, Calendar)
Synopsis: public void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
Method setDouble(int, double)
Synopsis: public void setDouble(int parameterIndex, double x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java double value.
Method setEscapeProcessing(boolean)
Synopsis: public void setEscapeProcessing(boolean flag) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
Method setFetchDirection(int)
Synopsis: public void setFetchDirection(int direction) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the result set type is TYPE_FORWARD_ONLY and direction is not FETCH_FORWARD. |
Give a hint as to the direction in which the rows in this result set will be processed. The initial value is determined by the statement that produced the result set. The fetch direction may be changed at any time.
Method setFetchSize(int)
Synopsis: public void setFetchSize(int rows) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the condition 0 <= rows <= this.getMaxRows() is not satisfied. |
Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set. If the fetch size specified is zero, then the JDBC driver ignores the value, and is free to make its own best guess as to what the fetch size should be. The default value is set by the statement that creates the result set. The fetch size may be changed at any time.
Method setFloat(int, float)
Synopsis: public void setFloat(int parameterIndex, float x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.
Method setInt(int, int)
Synopsis: public void setInt(int parameterIndex, int x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java int value.
Method setLong(int, long)
Synopsis: public void setLong(int parameterIndex, long x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java long value.
Method setMaxFieldSize(int)
Synopsis: public void setMaxFieldSize(int max) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability use values greater than 256.
Method setMaxRows(int)
Synopsis: public void setMaxRows(int max) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The maxRows limit is set to limit the number of rows that any RowSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Method setNull(int, int)
Synopsis: public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to SQL NULL.
Note: You must specify the parameter's SQL type.
Method setNull(int, int, String)
Synopsis: public void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Sets the designated parameter to SQL NULL. This version of setNull should be used for user-named types and REF type parameters. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.
Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-named type the name is the type name of the parameter itself. For a REF parameter the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-named and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-named or REF type, the given typeName is ignored.
Method setObject(int, Object)
Synopsis: public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.
The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument java object will be converted to the corresponding SQL type before being sent to the database.
Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type. If the object is of a class implementing SQLData, the rowset should call its method writeSQL() to write it to the SQL data stream. else If the object is of a class implementing Ref, Blob, Clob, Struct, or Array then pass it to the database as a value of the corresponding SQL type. Raise an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of those interfaces.
Method setObject(int, Object, int)
Synopsis: public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
This method is like setObject above, but the scale used is the scale of the second parameter. Scalar values have a scale of zero. Literal values have the scale present in the literal. While it is supported, it is not recommended that this method not be called with floating point input values.
Method setObject(int, Object, int, int)
Synopsis: public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Additional Information |
|
---|---|
See Also |
java.sql.Types |
Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.
The given Java object will be converted to the targetSqlType before being sent to the database. If the object is of a class implementing SQLData, the rowset should call its method writeSQL() to write it to the SQL data stream. else If the object is of a class implementing Ref, Blob, Clob, Struct, or Array then pass it to the database as a value of the corresponding SQL type.
Note that this method may be used to pass datatabase- specific abstract data types.
Method setPassword(String)
Synopsis: public void setPassword(java.lang.String s) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the password.
Method setQueryTimeout(int)
Synopsis: public void setQueryTimeout(int seconds) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.
Method setReadOnly(boolean)
Synopsis: public void setReadOnly(boolean value) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the read-onlyness of the rowset
Method setRef(int, Ref)
Synopsis: public void setRef(int parameterIndex, java.sql.Ref x) throws java.sql.SQLException;
Parameters |
---|
|
|
Set a REF(<structured-type>) parameter.
Method setShort(int, short)
Synopsis: public void setShort(int parameterIndex, short x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java short value.
Method setString(int, String)
Synopsis: public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a Java String value.
Method setTime(int, Time)
Synopsis: public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Time value.
Method setTime(int, Time, Calendar)
Synopsis: public void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database.
Method setTimestamp(int, Timestamp)
Synopsis: public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Timestamp value.
Method setTimestamp(int, Timestamp, Calendar)
Synopsis: public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.
Method setTransactionIsolation(int)
Synopsis: public void setTransactionIsolation(int value) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the transaction isolation.
Method setType(int)
Synopsis: public void setType(int value) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Set the type of this result set.
Method setTypeMap(Map)
Synopsis: public void setTypeMap(java.util.Map value) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Install a type-map object as the default type-map for this rowset.
Method setUnicodeStream(int, InputStream, int)
Synopsis: public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format. |
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Method setUrl(String)
Synopsis: public void setUrl(java.lang.String s) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the url used to create a connection. Setting this property is optional. If a url is used, a JDBC driver that accepts the url must be loaded by the application before the rowset is used to connect to a database. The rowset will use the url internally to create a database connection when reading or writing data. Either a url or a data source name is used to create a connection, whichever was specified most recently.
Method setUsername(String)
Synopsis: public void setUsername(java.lang.String s) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the user name.
11.11.2.Class OPLCachedRowSet
A OPLCachedRowSet is a disconnected, serializable, scrollable container for tabular data. A primary purpose of the OPLCachedRowSet class is to provide a representation of a JDBC ResultSet that can be passed between different components of a remote application. For example, a OPLCachedRowSet can be used to send the result of a query executed by an Enterprise JavaBeans component running in a server environment over a network to a client running in a web browser. A second use for OPLCachedRowSets is to provide scrolling and updating for ResultSets that don't provide these capabilities themselves. A OPLCachedRowSet can be used to augment the capabilities of a JDBC driver that doesn't have full support for scrolling and updating. Finally, a OPLCachedRowSet can be used to provide Java applications with access to tabular data in an environment such as a thin client or PDA, where it would be inappropriate to use a JDBC driver due to resource limitations or security considerations. The OPLCachedRowSet class provides a means to "get rows in" and "get changed rows out" without the need to implement the full JDBC API.
A OPLCachedRowSet object can contain data retrieved via a JDBC driver or data from some other source, such as a spreadsheet. Both a OPLCachedRowSet object and its metadata can be created from scratch. A component that acts as a factory for rowsets can use this capability to create a rowset containing data from non-JDBC data sources.
The term 'disconnected' implies that a OPLCachedRowSet only makes use of a JDBC connection briefly while data is being read from the database and used to populate it with rows, and again while updated rows are being propagated back to the underlying database. During the remainder of its lifetime, a OPLCachedRowSet object isn't associated with an underlying database connection. A OPLCachedRowSet object can simply be thought of as a disconnected set of rows that are being cached outside of a data source. Since all data is cached in memory, OPLCachedRowSets are not appropriate for extremely large data sets.
The contents of a OPLCachedRowSet may be updated and the updates can be propagated to an underlying data source. OPLCachedRowSets support an optimistic concurrency control mechanism - no locks are maintained in the underlying database during disconnected use of the rowset. Both the original value and current value of the OPLCachedRowSet are maintained for use by the optimistic routines.
Synopsis
public class OPLCachedRowSet extends BaseRowSet implements RowSetInternal,Serializable,Cloneable { // Public Constructors public OPLCachedRowSet() throws java.sql.SQLException; // Public Methods public void finalize() throws java.lang.Throwable; public void setCommand(java.lang.String cmd) throws java.sql.SQLException; public void setConcurrency(int concurrency) throws java.sql.SQLException; public void acceptChanges() throws java.sql.SQLException; public void acceptChanges(java.sql.Connection _conn) throws java.sql.SQLException; public void execute() throws java.sql.SQLException; public void execute(java.sql.Connection _conn) throws java.sql.SQLException; public void populate(java.sql.ResultSet rs) throws java.sql.SQLException; public void setShowDeleted(boolean value) throws java.sql.SQLException; public boolean getShowDeleted() throws java.sql.SQLException; public String getTableName() throws java.sql.SQLException; public void setTableName(java.lang.String _tableName) throws java.sql.SQLException; public int[] getKeyCols() throws java.sql.SQLException; public void setKeyColumns(int[] keys) throws java.sql.SQLException; public void cancelRowDelete() throws java.sql.SQLException; public void cancelRowInsert() throws java.sql.SQLException; public void cancelRowUpdates() throws java.sql.SQLException; public boolean columnUpdated(int columnIndex) throws java.sql.SQLException; public void setOriginal() throws java.sql.SQLException; public void setOriginalRow() throws java.sql.SQLException; public void restoreOriginal() throws java.sql.SQLException; public int size(); public Collection toCollection() throws java.sql.SQLException; public Collection toCollection(int col) throws java.sql.SQLException; public void release() throws java.sql.SQLException; public RowSet createCopy() throws java.sql.SQLException; public RowSet createShared() throws java.sql.SQLException; public void setMetaData(javax.sql.RowSetMetaData md) throws java.sql.SQLException; public Connection getConnection() throws java.sql.SQLException; public ResultSet getOriginal() throws java.sql.SQLException; public ResultSet getOriginalRow() throws java.sql.SQLException; public void close() throws java.sql.SQLException; public boolean next() throws java.sql.SQLException; public boolean previous() throws java.sql.SQLException; public boolean first() throws java.sql.SQLException; public boolean last() throws java.sql.SQLException; public boolean absolute(int row) throws java.sql.SQLException; public boolean relative(int rows) throws java.sql.SQLException; public void beforeFirst() throws java.sql.SQLException; public void afterLast() throws java.sql.SQLException; public boolean isBeforeFirst() throws java.sql.SQLException; public boolean isAfterLast() throws java.sql.SQLException; public boolean isFirst() throws java.sql.SQLException; public boolean isLast() throws java.sql.SQLException; public int getRow() throws java.sql.SQLException; public boolean rowUpdated() throws java.sql.SQLException; public boolean rowInserted() throws java.sql.SQLException; public boolean rowDeleted() throws java.sql.SQLException; public void refreshRow() throws java.sql.SQLException; public void insertRow() throws java.sql.SQLException; public void updateRow() throws java.sql.SQLException; public void deleteRow() throws java.sql.SQLException; public void moveToInsertRow() throws java.sql.SQLException; public void moveToCurrentRow() throws java.sql.SQLException; public boolean wasNull() throws java.sql.SQLException; public SQLWarning getWarnings() throws java.sql.SQLException; public void clearWarnings() throws java.sql.SQLException; public String getCursorName() throws java.sql.SQLException; public ResultSetMetaData getMetaData() throws java.sql.SQLException; public int findColumn(java.lang.String columnName) throws java.sql.SQLException; public String getString(int columnIndex) throws java.sql.SQLException; public boolean getBoolean(int columnIndex) throws java.sql.SQLException; public byte getByte(int columnIndex) throws java.sql.SQLException; public short getShort(int columnIndex) throws java.sql.SQLException; public int getInt(int columnIndex) throws java.sql.SQLException; public long getLong(int columnIndex) throws java.sql.SQLException; public float getFloat(int columnIndex) throws java.sql.SQLException; public double getDouble(int columnIndex) throws java.sql.SQLException; public BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException; public BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException; public byte[] getBytes(int columnIndex) throws java.sql.SQLException; public Date getDate(int columnIndex) throws java.sql.SQLException; public Time getTime(int columnIndex) throws java.sql.SQLException; public Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException; public InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException; public InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException; public InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException; public Object getObject(int columnIndex) throws java.sql.SQLException; public String getString(java.lang.String columnName) throws java.sql.SQLException; public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException; public byte getByte(java.lang.String columnName) throws java.sql.SQLException; public short getShort(java.lang.String columnName) throws java.sql.SQLException; public int getInt(java.lang.String columnName) throws java.sql.SQLException; public long getLong(java.lang.String columnName) throws java.sql.SQLException; public float getFloat(java.lang.String columnName) throws java.sql.SQLException; public double getDouble(java.lang.String columnName) throws java.sql.SQLException; public BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException; public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException; public Date getDate(java.lang.String columnName) throws java.sql.SQLException; public Time getTime(java.lang.String columnName) throws java.sql.SQLException; public Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException; public InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException; public InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException; public InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException; public Object getObject(java.lang.String columnName) throws java.sql.SQLException; public Reader getCharacterStream(int columnIndex) throws java.sql.SQLException; public Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException; public BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException; public void updateNull(int columnIndex) throws java.sql.SQLException; public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException; public void updateByte(int columnIndex, byte x) throws java.sql.SQLException; public void updateShort(int columnIndex, short x) throws java.sql.SQLException; public void updateInt(int columnIndex, int x) throws java.sql.SQLException; public void updateLong(int columnIndex, long x) throws java.sql.SQLException; public void updateFloat(int columnIndex, float x) throws java.sql.SQLException; public void updateDouble(int columnIndex, double x) throws java.sql.SQLException; public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException; public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException; public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException; public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException; public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException; public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException; public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException; public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException; public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException; public void updateNull(java.lang.String columnName) throws java.sql.SQLException; public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.SQLException; public void updateByte(java.lang.String columnName, byte x) throws java.sql.SQLException; public void updateShort(java.lang.String columnName, short x) throws java.sql.SQLException; public void updateInt(java.lang.String columnName, int x) throws java.sql.SQLException; public void updateLong(java.lang.String columnName, long x) throws java.sql.SQLException; public void updateFloat(java.lang.String columnName, float x) throws java.sql.SQLException; public void updateDouble(java.lang.String columnName, double x) throws java.sql.SQLException; public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.SQLException; public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.SQLException; public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.SQLException; public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.SQLException; public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.SQLException; public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.SQLException; public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws java.sql.SQLException; public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.SQLException; public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.SQLException; public Statement getStatement() throws java.sql.SQLException; public Object getObject(int colIndex, java.util.Map map) throws java.sql.SQLException; public Ref getRef(int colIndex) throws java.sql.SQLException; public Blob getBlob(int colIndex) throws java.sql.SQLException; public Clob getClob(int colIndex) throws java.sql.SQLException; public Array getArray(int colIndex) throws java.sql.SQLException; public Object getObject(java.lang.String colName, java.util.Map map) throws java.sql.SQLException; public Ref getRef(java.lang.String colName) throws java.sql.SQLException; public Blob getBlob(java.lang.String colName) throws java.sql.SQLException; public Clob getClob(java.lang.String colName) throws java.sql.SQLException; public Array getArray(java.lang.String colName) throws java.sql.SQLException; public Date getDate(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Date getDate(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public Time getTime(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Time getTime(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public Timestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public URL getURL(int columnIndex) throws java.sql.SQLException; public URL getURL(java.lang.String columnName) throws java.sql.SQLException; public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException; public void updateRef(java.lang.String columnName, java.sql.Ref x) throws java.sql.SQLException; public void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLException; public void updateBlob(java.lang.String columnName, java.sql.Blob x) throws java.sql.SQLException; public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLException; public void updateClob(java.lang.String columnName, java.sql.Clob x) throws java.sql.SQLException; public void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLException; public void updateArray(java.lang.String columnName, java.sql.Array x) throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.BaseRowSet |
| |
openlink.javax.OPLCachedRowSet |
Members
Constructor OPLCachedRowSet()
Synopsis: public OPLCachedRowSet() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Create a OPLCachedRowSet object. The object has no metadata.
Method absolute(int)
Synopsis: public boolean absolute(int row) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or row is 0, or rowset type is TYPE_FORWARD_ONLY. |
Move to an absolute row number in the rowset. It notifies listeners that the cursor has moved.
If row is positive, moves to an absolute row with respect to the beginning of the rowset. The first row is row 1, the second is row 2, etc.
If row is negative, moves to an absolute row position with respect to the end of rowset. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) indicates the next-to-last row, etc.
An attempt to position the cursor beyond the first/last row in the rowset, leaves the cursor before/after the first/last row, respectively.
Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
Method acceptChanges()
Synopsis: public void acceptChanges() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Propagate all row update, insert, and delete changes to a data source. An SQLException is thrown if any of the updates cannot be propagated. If acceptChanges() fails then the caller can assume that none of the updates are reflected in the data source. The current row is set to the first "updated" row that resulted in an exception, in the case that an exception is thrown. With one exception, if the row that caused the exception is a "deleted" row, then in the usual case, when deleted rows are not shown, the current row isn't affected. When successful, calling acceptChanges() replaces the original value of the rowset with the current value. Note: Both the original and current value of the rowset are maintained. The original state is the value of the rowset following its creation (i.e. empty), or following the last call to acceptChanges(), execute(), populate(), release(), or restoreOriginal(). Internally, a RowSetWriter component is envoked to write the data for each row.
Method acceptChanges(Connection)
Synopsis: public void acceptChanges(java.sql.Connection _conn) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Like acceptChanges() above, but takes a Connection argument. The Connection is used internally when doing the updates. This form isn't used unless the underlying data source is a JDBC data source.
Method afterLast()
Synopsis: public void afterLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or rowset type is TYPE_FORWARD_ONLY. |
Moves to the end of the rowset, just after the last row. Has no effect if the rowset contains no rows. It notifies listeners that the cursor has moved.
Method beforeFirst()
Synopsis: public void beforeFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or rowset type is TYPE_FORWARD_ONLY |
Moves to the front of the rowset, just before the first row. Has no effect if the rowset contains no rows. It notifies listeners that the cursor has moved.
Method cancelRowDelete()
Synopsis: public void cancelRowDelete() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Cancels deletion of the current row and notifies listeners that a row has changed. After calling cancelRowDelete() the current row is no longer marked for deletion. An exception is thrown if there is no current row. Note: This method can be ignored if deleted rows aren't being shown (the normal case).
Method cancelRowInsert()
Synopsis: public void cancelRowInsert() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Cancels insertion of the current row and notifies listeners that a row has changed. An exception is thrown if the row isn't an inserted row. The current row is immediately removed from the rowset. This operation cannot be undone.
Method cancelRowUpdates()
Synopsis: public void cancelRowUpdates() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. If no updates have been made or updateRow() has already been called, then this method has no effect. It notifies listeners that a row has changed, if it has effect.
Method clearWarnings()
Synopsis: public void clearWarnings() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
After this call getWarnings returns null until a new warning is reported for this ResultSet.
Method close()
Synopsis: public void close() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Releases the current contents of this rowset, discarding outstanding updates. The rowset contains no rows after the method release is called. This method sends a RowSetChangedEvent object to all registered listeners prior to returning.
Method columnUpdated(int)
Synopsis: public boolean columnUpdated(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Determine if the column from the current row has been updated.
Method createCopy()
Synopsis: public RowSet createCopy() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Creates a RowSet object that is a deep copy of this OPLCachedRowSet object's data. Updates made on a copy are not visible to the original rowset; a copy of a rowset is completely independent from the original. Making a copy saves the cost of creating an identical rowset from first principles, which can be quite expensive. For example, it doesn't do the query to a remote database server.
Method createShared()
Synopsis: public RowSet createShared() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Returns a new rowset object backed by the same data. Updates made by a shared duplicate are visible to the original rowset and other duplicates. A rowset and its duplicates form a set of cursors that iterate over a shared set of rows, providing different views of the underlying data. Duplicates also share property values. So, for example, if a rowset is read-only then all of its duplicates will be read-only.
Method deleteRow()
Synopsis: public void deleteRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row. |
Delete the current row from this OPLCachedRowSet object and it notifies listeners that a row has changed. Cannot be called when the cursor is on the insert row. The method marks the current row as deleted, but it does not delete the row from the underlying data source. The method acceptChanges must be called to delete the row in the data source.
Method execute()
Synopsis: public void execute() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Populates this OPLCachedRowSet object with data. This form of the method uses the rowset's user, password, and url or data source name properties to create a database connection. If properties that are needed have not been set, this method will throw an exception. Another form of this method uses an existing JDBC Connection object instead of creating a new one; therefore, it ignores the properties used for establishing a new connection. The query specified by the command property is executed to create a ResultSet object from which to retrieve data. The current contents of the rowset are discarded, and the rowset's metadata is also (re)set. If there are outstanding updates, they are also ignored. The method execute closes any database connections that it creates.
Method execute(Connection)
Synopsis: public void execute(java.sql.Connection _conn) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Populates the rowset with data. The first form uses the properties: url/data source name, user, and password to create a database connection. If these properties haven't been set, an exception is thrown. The second form uses an existing JDBC connection object instead. The values of the url/data source name, user, and password properties are ignored when the second form is used. Execute() closes any database connections that it creates. The command specified by the command property is executed to retrieve the data. The current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are also ignored.
Method findColumn(String)
Synopsis: public int findColumn(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Map a Resultset column name to a ResultSet column index.
Method first()
Synopsis: public boolean first() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or rowset type is TYPE_FORWARD_ONLY. |
Moves to the first row in the rowset. It notifies listeners that the cursor has moved.
Method getArray(int)
Synopsis: public Array getArray(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get an array column.
Method getArray(String)
Synopsis: public Array getArray(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get an array column.
Method getAsciiStream(int)
Synopsis: public InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
Method getAsciiStream(String)
Synopsis: public InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getBigDecimal(int)
Synopsis: public BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.math.BigDecimal object.
Method getBigDecimal(int, int)
Synopsis: public BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
Get the value of a column in the current row as a java.math.BigDecimal object. |
Method getBigDecimal(String)
Synopsis: public BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException;
Get the value of a column in the current row as a java.math.BigDecimal object.
Method getBigDecimal(String, int)
Synopsis: public BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
Get the value of a column in the current row as a java.math.BigDecimal object. |
Method getBinaryStream(int)
Synopsis: public InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
Method getBinaryStream(String)
Synopsis: public InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getBlob(int)
Synopsis: public Blob getBlob(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a BLOB column.
Method getBlob(String)
Synopsis: public Blob getBlob(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a BLOB column.
Method getBoolean(int)
Synopsis: public boolean getBoolean(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java boolean.
Method getBoolean(String)
Synopsis: public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java boolean.
Method getByte(int)
Synopsis: public byte getByte(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte.
Method getByte(String)
Synopsis: public byte getByte(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte.
Method getBytes(int)
Synopsis: public byte[] getBytes(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte array. The bytes represent the raw values returned by the driver.
Method getBytes(String)
Synopsis: public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte array. The bytes represent the raw values returned by the driver.
Method getCharacterStream(int)
Synopsis: public Reader getCharacterStream(int columnIndex) throws java.sql.SQLException;
Get the value of a column in the current row as a java.io.Reader.
Method getCharacterStream(String)
Synopsis: public Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException;
Get the value of a column in the current row as a java.io.Reader.
Method getClob(int)
Synopsis: public Clob getClob(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a CLOB column.
Method getClob(String)
Synopsis: public Clob getClob(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a CLOB column.
Method getConnection()
Synopsis: public Connection getConnection() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the Connection passed to the rowset.
Method getCursorName()
Synopsis: public String getCursorName() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Get the name of the SQL cursor used by this ResultSet.
Method getDate(int)
Synopsis: public Date getDate(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object.
Method getDate(int, Calendar)
Synopsis: public Date getDate(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.
Method getDate(String)
Synopsis: public Date getDate(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object.
Method getDate(String, Calendar)
Synopsis: public Date getDate(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.
Method getDouble(int)
Synopsis: public double getDouble(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java double.
Method getDouble(String)
Synopsis: public double getDouble(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java double.
Method getFloat(int)
Synopsis: public float getFloat(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java float.
Method getFloat(String)
Synopsis: public float getFloat(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java float.
Method getInt(int)
Synopsis: public int getInt(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java int.
Method getInt(String)
Synopsis: public int getInt(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java int.
Method getKeyCols()
Synopsis: public int[] getKeyCols() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Returns the columns that make a key to uniquely identify a row in this OPLCachedRowSet object.
Method getLong(int)
Synopsis: public long getLong(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java long.
Method getLong(String)
Synopsis: public long getLong(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java long.
Method getMetaData()
Synopsis: public ResultSetMetaData getMetaData() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The number, types and properties of a ResultSet's columns are provided by the getMetaData method.
Method getObject(int)
Synopsis: public Object getObject(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC spec.
This method may also be used to read database specific abstract data types. JDBC 2.0 New behavior for getObject(). The behavior of method getObject() is extended to materialize data of SQL user-defined types. When the column @column is a structured or distinct value, the behavior of this method is as if it were a call to: getObject(column, this.getStatement().getConnection().getTypeMap()).
Method getObject(int, Map)
Synopsis: public Object getObject(int colIndex, java.util.Map map) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Returns the value of column @i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.
Method getObject(String)
Synopsis: public Object getObject(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC spec.
This method may also be used to read database specific abstract data types. JDBC 2.0 New behavior for getObject(). The behavior of method getObject() is extended to materialize data of SQL user-defined types. When the column @columnName is a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnName, this.getStatement().getConnection().getTypeMap()).
Method getObject(String, Map)
Synopsis: public Object getObject(java.lang.String colName, java.util.Map map) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Returns the value of column @i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.
Method getOriginal()
Synopsis: public ResultSet getOriginal() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Returns a result set containing the original value of the rowset. The cursor is positioned before the first row in the result set. Only rows contained in the result set returned by getOriginal() are said to have an original value.
Method getOriginalRow()
Synopsis: public ResultSet getOriginalRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Returns a result set containing the original value of the current row only. If the current row has no original value an empty result set is returned. If there is no current row an exception is thrown.
Method getRef(int)
Synopsis: public Ref getRef(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a REF(<structured-type>) column.
Method getRef(String)
Synopsis: public Ref getRef(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a REF(<structured-type>) column.
Method getRow()
Synopsis: public int getRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine the current row number. The first row is number 1, the second number 2, etc.
Method getShort(int)
Synopsis: public short getShort(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java short.
Method getShort(String)
Synopsis: public short getShort(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java short.
Method getShowDeleted()
Synopsis: public boolean getShowDeleted() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
This property determines whether or not rows marked for deletion appear in the set of current rows. The default value is false.
Method getStatement()
Synopsis: public Statement getStatement() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Return the Statement that produced the ResultSet.
Method getString(int)
Synopsis: public String getString(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java String.
Method getString(String)
Synopsis: public String getString(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java String.
Method getTableName()
Synopsis: public String getTableName() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Returns an identifier for the object (table) that was used to create this rowset.
Method getTime(int)
Synopsis: public Time getTime(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object.
Method getTime(int, Calendar)
Synopsis: public Time getTime(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.
Method getTime(String)
Synopsis: public Time getTime(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object.
Method getTime(String, Calendar)
Synopsis: public Time getTime(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.
Method getTimestamp(int)
Synopsis: public Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object.
Method getTimestamp(int, Calendar)
Synopsis: public Timestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.
Method getTimestamp(String)
Synopsis: public Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object.
Method getTimestamp(String, Calendar)
Synopsis: public Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.
Method getUnicodeStream(int)
Synopsis: public InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
A column value can be retrieved as a stream of Unicode characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. |
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
Method getUnicodeStream(String)
Synopsis: public InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
A column value can be retrieved as a stream of Unicode characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. |
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getURL(int)
Synopsis: public URL getURL(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs, or if a URL is malformed |
Additional Information |
|
---|---|
Since |
1.4 |
Retrieves the value of the designated column in the current row
of this ResultSet
object as a
java.net.URL
object in the Java
programming language.
Method getURL(String)
Synopsis: public URL getURL(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs or if a URL is malformed |
Additional Information |
|
---|---|
Since |
1.4 |
Retrieves the value of the designated column in the current row
of this ResultSet
object as a
java.net.URL
object in the Java
programming language.
Method getWarnings()
Synopsis: public SQLWarning getWarnings() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The first warning reported by calls on this ResultSet is returned. Subsequent ResultSet warnings will be chained to this SQLWarning.
The warning chain is automatically cleared each time a new row is read.
Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.
Method insertRow()
Synopsis: public void insertRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database access error occurs, if this method is called when the cursor is not on the insert row |
Inserts the contents of the insert row into this rowset following the current row and it notifies listeners that the row has changed. The cursor must be on the insert row when this method is called. The method marks the current row as inserted, but it does not insert the row to the underlying data source. The method acceptChanges must be called to insert the row to the data source.
Method isAfterLast()
Synopsis: public boolean isAfterLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is after the last row in the rowset.
Method isBeforeFirst()
Synopsis: public boolean isBeforeFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is before the first row in the rowset.
Method isFirst()
Synopsis: public boolean isFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is on the first row of the rowset.
Method isLast()
Synopsis: public boolean isLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is on the last row of the rowset. Note: Calling isLast() may be expensive since the rowset might need to check ahead one row in order to determine whether the current row is the last row in the rowset.
Method last()
Synopsis: public boolean last() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or rowset type is TYPE_FORWARD_ONLY. |
Moves to the last row in the rowset. It notifies listeners that the cursor has moved.
Method moveToCurrentRow()
Synopsis: public void moveToCurrentRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the rowset is not updatable |
Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row.
Method moveToInsertRow()
Synopsis: public void moveToInsertRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the rowset is not updatable |
Move to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable rowset. It is essentially a buffer where a new row may be constructed by calling the updateXXX() methods prior to inserting the row into the rowset. Only the updateXXX(), getXXX(), and insertRow() methods may be called when the cursor is on the insert row. All of the columns in a rowset must be given a value each time this method is called before calling insertRow(). UpdateXXX()must be called before getXXX() on a column.
Method next()
Synopsis: public boolean next() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.
If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read.
Method populate(ResultSet)
Synopsis: public void populate(java.sql.ResultSet rs) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Populate the OPLCachedRowSet object with data from a ResultSet. This method is an alternative to execute() for filling the rowset with data. Populate() doesn't require that the properties needed by execute(), such as the command property, be set. A RowSetChangedEvent is sent to all registered listeners prior to returning.
Method previous()
Synopsis: public boolean previous() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or rowset type is TYPE_FORWAR_DONLY. |
Moves to the previous row in the rowset.
Note: previous() is not the same as relative(-1) since it makes sense to call previous() when there is no current row.
Method refreshRow()
Synopsis: public void refreshRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row. |
Sets the current row with its original value and marks the row as not updated, thus undoing any changes made to the row since the last call to the methods updateRow or deleteRow. This method should be called only when the cursor is on a row in this rowset. Cannot be called when on the insert row.
Method relative(int)
Synopsis: public boolean relative(int rows) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or there is no current row, or rowset type is TYPE_FORWARD_ONLY. |
Moves a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the rowset positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position. It notifies listeners that the cursor has moved.
Note: Calling relative(1) is different than calling next() since is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the rowset.
Method release()
Synopsis: public void release() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Releases the current contents of the rowset. Outstanding updates are discarded. The rowset contains no rows after release is called. A RowSetChangedEvent is sent to all registered listeners prior to returning.
Method restoreOriginal()
Synopsis: public void restoreOriginal() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Restores the rowset to its original state ( the original value of the rowset becomes the current value). All updates, inserts, and deletes made to the original state are lost. The cursor is positioned before the first row. A RowSetChangedEvent is sent to all registered listeners prior to returning.
Method rowDeleted()
Synopsis: public boolean rowDeleted() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.deletesAreDetected |
Determine if this row has been deleted. A deleted row may leave a visible "hole" in a rowset. This method can be used to detect holes in a rowset. The value returned depends on whether or not the rowset can detect deletions.
Method rowInserted()
Synopsis: public boolean rowInserted() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.insertsAreDetected |
Determine if the current row has been inserted. The value returned depends on whether or not the rowset can detect visible inserts.
Method rowUpdated()
Synopsis: public boolean rowUpdated() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.updatesAreDetected |
Determine if the current row has been updated. The value returned depends on whether or not the rowset can detect updates.
Method setCommand(String)
Synopsis: public void setCommand(java.lang.String cmd) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
- if an error occurs |
Sets this OPLCachedRowSet object's command property to the given String object and clears the parameters, if any, that were set for the previous command.
Method setConcurrency(int)
Synopsis: public void setConcurrency(int concurrency) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
- if an error occurs |
Sets the concurrency for this rowset to the specified concurrency. The default concurrency is ResultSet.CONCUR_UPDATABLE.
Method setKeyColumns(int[])
Synopsis: public void setKeyColumns(int[] keys) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Sets this OPLCachedRowSet object's keyCols field with the given array of column numbers, which forms a key for uniquely identifying a row in this rowset. Note: If you don't set the keyCols, the OPLCachedRowSet will set automatically based on RowSetMetaData
Method setMetaData(RowSetMetaData)
Synopsis: public void setMetaData(javax.sql.RowSetMetaData md) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the rowset's metadata.
Method setOriginal()
Synopsis: public void setOriginal() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Marks all rows in this rowset as being original rows. Any updates made to the rows become the original values for the rowset. Calls to the method setOriginal cannot be reversed.
Method setOriginalRow()
Synopsis: public void setOriginalRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Marks the current row in this rowset as being an original row. The row is no longer marked as inserted, deleted, or updated, and its values become the original values. A call to setOriginalRow cannot be reversed.
Method setShowDeleted(boolean)
Synopsis: public void setShowDeleted(boolean value) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Set the show deleted property.
Method setTableName(String)
Synopsis: public void setTableName(java.lang.String _tableName) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Sets the identifier for the table from which this rowset was derived to the given table name. Note: You don't usually need to set a table name, because the OPLCachedRowSet tries to determine the table name from your SQL query command.
Method size()
Synopsis: public int size();
Returns the number of rows in this OPLCachedRowSet object.
Method toCollection()
Synopsis: public Collection toCollection() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Convert the rowset to a collection of tables. Each tables represents a row of the original rowset. The tables are keyed by column number. A copy of the rowset's contents is made.
Method toCollection(int)
Synopsis: public Collection toCollection(int col) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Return a column of the rowset as a collection. Makes a copy of the column's data.
Method updateArray(int, Array)
Synopsis: public void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Array
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateArray(String, Array)
Synopsis: public void updateArray(java.lang.String columnName, java.sql.Array x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Array
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateAsciiStream(int, InputStream, int)
Synopsis: public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateAsciiStream(String, InputStream, int)
Synopsis: public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBigDecimal(int, BigDecimal)
Synopsis: public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBigDecimal(String, BigDecimal)
Synopsis: public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBinaryStream(int, InputStream, int)
Synopsis: public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBinaryStream(String, InputStream, int)
Synopsis: public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBlob(int, Blob)
Synopsis: public void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Blob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateBlob(String, Blob)
Synopsis: public void updateBlob(java.lang.String columnName, java.sql.Blob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Blob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateBoolean(int, boolean)
Synopsis: public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBoolean(String, boolean)
Synopsis: public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateByte(int, byte)
Synopsis: public void updateByte(int columnIndex, byte x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateByte(String, byte)
Synopsis: public void updateByte(java.lang.String columnName, byte x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBytes(int, byte[])
Synopsis: public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBytes(String, byte[])
Synopsis: public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateCharacterStream(int, Reader, int)
Synopsis: public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateCharacterStream(String, Reader, int)
Synopsis: public void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateClob(int, Clob)
Synopsis: public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Clob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateClob(String, Clob)
Synopsis: public void updateClob(java.lang.String columnName, java.sql.Clob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Clob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateDate(int, Date)
Synopsis: public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDate(String, Date)
Synopsis: public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDouble(int, double)
Synopsis: public void updateDouble(int columnIndex, double x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDouble(String, double)
Synopsis: public void updateDouble(java.lang.String columnName, double x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateFloat(int, float)
Synopsis: public void updateFloat(int columnIndex, float x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateFloat(String, float)
Synopsis: public void updateFloat(java.lang.String columnName, float x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateInt(int, int)
Synopsis: public void updateInt(int columnIndex, int x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateInt(String, int)
Synopsis: public void updateInt(java.lang.String columnName, int x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateLong(int, long)
Synopsis: public void updateLong(int columnIndex, long x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateLong(String, long)
Synopsis: public void updateLong(java.lang.String columnName, long x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateNull(int)
Synopsis: public void updateNull(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Give a nullable column a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateNull(String)
Synopsis: public void updateNull(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(int, Object)
Synopsis: public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(int, Object, int)
Synopsis: public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(String, Object)
Synopsis: public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(String, Object, int)
Synopsis: public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateRef(int, Ref)
Synopsis: public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Ref
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateRef(String, Ref)
Synopsis: public void updateRef(java.lang.String columnName, java.sql.Ref x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Ref
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateRow()
Synopsis: public void updateRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row |
Marks the current row of this rowset as updated but it does not update the row to the underlying data source. The method acceptChanges must be called to update the row to the data source. It notifies listeners that the row has changed also. Cannot be called when on the insert row.
Method updateShort(int, short)
Synopsis: public void updateShort(int columnIndex, short x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateShort(String, short)
Synopsis: public void updateShort(java.lang.String columnName, short x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateString(int, String)
Synopsis: public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateString(String, String)
Synopsis: public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTime(int, Time)
Synopsis: public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTime(String, Time)
Synopsis: public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTimestamp(int, Timestamp)
Synopsis: public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTimestamp(String, Timestamp)
Synopsis: public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method wasNull()
Synopsis: public boolean wasNull() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to find if the value was the SQL NULL.
11.11.3.Class OPLConnectionPoolDataSource
A ConnectionPoolDataSource object is a factory for PooledConnection objects. An object that implements this interface will typically be registered with a JNDI service.
Synopsis
public class OPLConnectionPoolDataSource extends OPLDataSource implements ConnectionPoolDataSource,Serializable,Referenceable,ConnectionEventListener { // Public Constructors public OPLConnectionPoolDataSource(); // Public Methods public void finalize() throws java.lang.Throwable; public OPLPoolStatistic get_statistics(); public OPLPoolStatistic[] getAll_statistics(); public void close() throws java.sql.SQLException; public void connectionClosed(javax.sql.ConnectionEvent event); public void connectionErrorOccurred(javax.sql.ConnectionEvent event); public Reference getReference() throws javax.naming.NamingException; public void fill() throws java.sql.SQLException; public PooledConnection getPooledConnection() throws java.sql.SQLException; public PooledConnection getPooledConnection(java.lang.String _user, java.lang.String _password) throws java.sql.SQLException; public int getMinPoolSize(); public void setMinPoolSize(int parm) throws java.sql.SQLException; public int getMaxPoolSize(); public void setMaxPoolSize(int parm) throws java.sql.SQLException; public int getInitialPoolSize(); public void setInitialPoolSize(int parm) throws java.sql.SQLException; public int getMaxIdleTime(); public void setMaxIdleTime(int parm) throws java.sql.SQLException; public int getPropertyCycle(); public void setPropertyCycle(int parm); public int getMaxStatements(); public void setMaxStatements(int parm) throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLDataSource |
| |
openlink.javax.OPLConnectionPoolDataSource |
Members
Method close()
Synopsis: public void close() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Physically close all the pooled connections in the cache and free all the resources
Method connectionClosed(ConnectionEvent)
Synopsis: public void connectionClosed(javax.sql.ConnectionEvent event);
Parameters |
---|
|
Invoked when the application calls close() on its representation of the connection.
Method connectionErrorOccurred(ConnectionEvent)
Synopsis: public void connectionErrorOccurred(javax.sql.ConnectionEvent event);
Parameters |
---|
|
Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.
Method fill()
Synopsis: public void fill() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a error occurs |
Fills the cache with PooledConnections for later use. Ignored if the MinPoolSize is 0. It is usually called when the OPLConnectionPoolDataSource is created via JNDI calls.
Method get_statistics()
Synopsis: public OPLPoolStatistic get_statistics();
Return the cache statistics for the OPLConnectionPoolDataSource
Method getAll_statistics()
Synopsis: public OPLPoolStatistic[] getAll_statistics();
Return an array of the cache statistics for the all created OPLConnectionPoolDataSources
Method getInitialPoolSize()
Synopsis: public int getInitialPoolSize();
Get the number of physical connections the pool will contain when it is created
Method getMaxIdleTime()
Synopsis: public int getMaxIdleTime();
Get the number of seconds that a physical connection will remain unused in the pool before the connection is closed. Zero ( 0 ) indicates no limit.
Method getMaxPoolSize()
Synopsis: public int getMaxPoolSize();
Get the maximum number of physical connections the pool will be able contain. Zero ( 0 ) indicates no maximum size.
Method getMaxStatements()
Synopsis: public int getMaxStatements();
Get the total number of statements that the pool will keep open. Zero ( 0 ) indicates that caching of statements is disabled.
Method getMinPoolSize()
Synopsis: public int getMinPoolSize();
Get the minimum number of physical connections the pool will keep available at all times. Zero ( 0 ) indicates that connections will be created as needed.
Method getPooledConnection()
Synopsis: public PooledConnection getPooledConnection() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Attempt to establish a database connection.
Method getPooledConnection(String, String)
Synopsis: public PooledConnection getPooledConnection(java.lang.String _user, java.lang.String _password) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Attempt to establish a database connection.
Method getPropertyCycle()
Synopsis: public int getPropertyCycle();
Get the interval, in seconds, that the pool will wait before enforcing the current policy defined by the values of the above connection pool properties
Method setInitialPoolSize(int)
Synopsis: public void setInitialPoolSize(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if an error occurs |
Set the number of physical connections the pool should contain when it is created
Method setMaxIdleTime(int)
Synopsis: public void setMaxIdleTime(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if an error occurs |
Set the number of seconds that a physical connection should remain unused in the pool before the connection is closed. Zero ( 0 ) indicates no limit.
Method setMaxPoolSize(int)
Synopsis: public void setMaxPoolSize(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if an error occurs |
Set the maximum number of physical conections that the pool should contain. Zero ( 0 ) indicates no maximum size. The default value is 0 .
Method setMaxStatements(int)
Synopsis: public void setMaxStatements(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if an error occurs |
Set the total number of statements that the pool should keep open. Zero ( 0 ) indicates that caching of statements is disabled.
Method setMinPoolSize(int)
Synopsis: public void setMinPoolSize(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if an error occurs |
Set the number of physical connections the pool should keep available at all times. Zero ( 0 ) indicates that connections should be created as needed The default value is 0 .
Method setPropertyCycle(int)
Synopsis: public void setPropertyCycle(int parm);
Parameters |
---|
|
Set the interval, in seconds, that the pool should wait before enforcing the current policy defined by the values of the above connection pool properties
11.11.4.Class OPLDataSource
A DataSource object is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider. A JDBC driver that is accessed via the DataSource API does not automatically register itself with the DriverManager.
Synopsis
public class OPLDataSource implements DataSource,Serializable,Referenceable { // Public Constructors public OPLDataSource(); // Public Methods public Reference getReference() throws javax.naming.NamingException; public Connection getConnection() throws java.sql.SQLException; public Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException; public PrintWriter getLogWriter() throws java.sql.SQLException; public void setLogWriter(java.io.PrintWriter parm) throws java.sql.SQLException; public int getLoginTimeout() throws java.sql.SQLException; public void setLoginTimeout(int parm) throws java.sql.SQLException; public String getDataSourceName(); public void setDataSourceName(java.lang.String parm); public String getDescription(); public void setDescription(java.lang.String parm); public int getPortNumber(); public void setPortNumber(int parm); public String getServerName(); public void setServerName(java.lang.String parm); public String getDatabaseName(); public void setDatabaseName(java.lang.String parm); public String getUser(); public void setUser(java.lang.String parm); public String getPassword(); public void setPassword(java.lang.String parm); public String getSVT(); public void setSVT(java.lang.String parm); public boolean getReadOnly(); public void setReadOnly(boolean parm); public String getDbOptions(); public void setDbOptions(java.lang.String parm); public String getFBS(); public void setFBS(java.lang.String parm); public String getCharSet(); public void setCharSet(java.lang.String parm); public String getCursorModel(); public void setCursorModel(java.lang.String parm); public String getConcurrencyType(); public void setConcurrencyType(java.lang.String parm); public boolean getEncrypted(); public void setEncrypted(boolean parm); public boolean getDeferLongFetch(); public void setDeferLongFetch(boolean parm); public String getApplication(); public void setApplication(java.lang.String parm); public boolean getUnicode(); public void setUnicode(boolean parm); public String getURL(); public void setURL(java.lang.String parm); }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLDataSource |
Members
Method getApplication()
Synopsis: public String getApplication();
Get the Application name set on this DataSource instance.
Method getCharSet()
Synopsis: public String getCharSet();
Get the charset of remote database set on this DataSource instance.
Method getConcurrencyType()
Synopsis: public String getConcurrencyType();
Get the default Concurrency Type for scrollable ResultSets set on this DataSource instance.
Method getConnection()
Synopsis: public Connection getConnection() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Attempt to establish a database connection.
Method getConnection(String, String)
Synopsis: public Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Attempt to establish a database connection.
Method getCursorModel()
Synopsis: public String getCursorModel();
Get the default Cursor Model for scrollable ResultSets set on this DataSource instance.
Method getDatabaseName()
Synopsis: public String getDatabaseName();
Get the name of the database set on this DataSource instance.
Method getDataSourceName()
Synopsis: public String getDataSourceName();
Get the datasource name for this instance if set. The default value is "OPLDataSourceName"
Method getDbOptions()
Synopsis: public String getDbOptions();
Get the Database Options set on this DataSource instance.
Method getDeferLongFetch()
Synopsis: public boolean getDeferLongFetch();
Get if the DataSource instance uses the deferLongFetch for long data.
Method getDescription()
Synopsis: public String getDescription();
Get the description of this data source.
Method getEncrypted()
Synopsis: public boolean getEncrypted();
Get if the outgoing packets are encrypted for this DataSource instance.
Method getFBS()
Synopsis: public String getFBS();
Get the Fetch Buffer Size set on this DataSource instance.
Method getLoginTimeout()
Synopsis: public int getLoginTimeout() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.
Method getLogWriter()
Synopsis: public PrintWriter getLogWriter() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.
Method getPassword()
Synopsis: public String getPassword();
Get the password set on this DataSource instance.
Method getPortNumber()
Synopsis: public int getPortNumber();
Get the port number on which oplrqb is listening for requests. The default value is 5000
Method getReadOnly()
Synopsis: public boolean getReadOnly();
Get the ReadOnly attribute set on this DataSource instance.
Method getServerName()
Synopsis: public String getServerName();
Get the name of the host on which oplrqb is running. The default value is "localhost"
Method getSVT()
Synopsis: public String getSVT();
Get the ServerType set on this DataSource instance.
Method getUnicode()
Synopsis: public boolean getUnicode();
Get if the DataSource instance uses the Unicode connection with a DBMS agent.
Method getUser()
Synopsis: public String getUser();
Get the user name set on this DataSource instance.
Method setApplication(String)
Synopsis: public void setApplication(java.lang.String parm);
Parameters |
---|
|
Set the Application name with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setCharSet(String)
Synopsis: public void setCharSet(java.lang.String parm);
Parameters |
---|
|
Set the charset of remote database with which connections have
to be obtained. The default value is get from System.getProperty("fil...
Will be overwritten
with value from URL, if URL is set.
Method setConcurrencyType(String)
Synopsis: public void setConcurrencyType(java.lang.String parm);
Parameters |
---|
|
Set the default Concurrency Type for scrollable ResultSets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setCursorModel(String)
Synopsis: public void setCursorModel(java.lang.String parm);
Parameters |
---|
|
Set the default Cursor Model for scrollable ResultSets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setDatabaseName(String)
Synopsis: public void setDatabaseName(java.lang.String parm);
Parameters |
---|
|
Set the name of a particular database on a server. Will be overwritten with value from URL, if URL is set.
Method setDataSourceName(String)
Synopsis: public void setDataSourceName(java.lang.String parm);
Parameters |
---|
|
Set the DataSource name. The default value is "OPLDataSourceName"
Method setDbOptions(String)
Synopsis: public void setDbOptions(java.lang.String parm);
Parameters |
---|
|
Set the Database Options with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setDeferLongFetch(boolean)
Synopsis: public void setDeferLongFetch(boolean parm);
Parameters |
---|
|
Set the DeferLongFetch attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.
Method setDescription(String)
Synopsis: public void setDescription(java.lang.String parm);
Parameters |
---|
|
Set the description for this data source instance.
Method setEncrypted(boolean)
Synopsis: public void setEncrypted(boolean parm);
Parameters |
---|
|
Set the Encrypted flag for outgoing packets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setFBS(String)
Synopsis: public void setFBS(java.lang.String parm);
Parameters |
---|
|
Sets number of JDBC resultset rows that get packed into a single network packet Will be overwritten with value from URL, if URL is set.
Method setLoginTimeout(int)
Synopsis: public void setLoginTimeout(int parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.
Method setLogWriter(PrintWriter)
Synopsis: public void setLogWriter(java.io.PrintWriter parm) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.
Method setPassword(String)
Synopsis: public void setPassword(java.lang.String parm);
Parameters |
---|
|
Set the password with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setPortNumber(int)
Synopsis: public void setPortNumber(int parm);
Parameters |
---|
|
Set the port number where the oplrqb is listening for requests. The default value is 5000 . Will be overwritten with value from URL, if URL is set.
Method setReadOnly(boolean)
Synopsis: public void setReadOnly(boolean parm);
Parameters |
---|
|
Set the ReadOnly attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.
Method setServerName(String)
Synopsis: public void setServerName(java.lang.String parm);
Parameters |
---|
|
Set the name of the host where the oplrqb is running. The default value is "localhost" . Will be overwritten with value from URL, if URL is set.
Method setSVT(String)
Synopsis: public void setSVT(java.lang.String parm);
Parameters |
---|
|
Set the ServerType with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
Method setUnicode(boolean)
Synopsis: public void setUnicode(boolean parm);
Parameters |
---|
|
Set the Unicode attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.
Method setURL(String)
Synopsis: public void setURL(java.lang.String parm);
Parameters |
---|
|
Set the URL with which connections have to be obtained.
Method setUser(String)
Synopsis: public void setUser(java.lang.String parm);
Parameters |
---|
|
Set the user name with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.
11.11.5.Class OPLDataSourceFactory
Synopsis
public class OPLDataSourceFactory implements ObjectFactory { // Public Constructors public OPLDataSourceFactory(); // Public Methods public Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment) throws java.lang.Exception; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLDataSourceFactory |
11.11.6.Class OPLJdbcRowSet
A OPLJdbcRowSet is a connected rowset. The purpose of the OPLJdbcRowSet class is to act like a JavaBean at design time and provide a thin layer that wraps around a JDBC ResultSet at runtime.
When execute() is called a OPLJdbcRowSet object opens a JDBC connection internally which remains open until close() is called, unless a Connection is passed to execute() explicitly, in which case that Connection is used instead. ResultSet operations such as cursor movement, updating, etc. are simply delegated to an underlying JDBC ResultSet object which is maintained internally.
Synopsis
public class OPLJdbcRowSet extends BaseRowSet { // Public Constructors public OPLJdbcRowSet(); // Public Methods public void finalize() throws java.lang.Throwable; public void execute() throws java.sql.SQLException; public void execute(java.sql.Connection _conn) throws java.sql.SQLException; public void close() throws java.sql.SQLException; public void cancelRowUpdates() throws java.sql.SQLException; public boolean next() throws java.sql.SQLException; public boolean previous() throws java.sql.SQLException; public boolean first() throws java.sql.SQLException; public boolean last() throws java.sql.SQLException; public boolean absolute(int row) throws java.sql.SQLException; public boolean relative(int rows) throws java.sql.SQLException; public void beforeFirst() throws java.sql.SQLException; public void afterLast() throws java.sql.SQLException; public boolean isBeforeFirst() throws java.sql.SQLException; public boolean isAfterLast() throws java.sql.SQLException; public boolean isFirst() throws java.sql.SQLException; public boolean isLast() throws java.sql.SQLException; public int getRow() throws java.sql.SQLException; public boolean rowUpdated() throws java.sql.SQLException; public boolean rowInserted() throws java.sql.SQLException; public boolean rowDeleted() throws java.sql.SQLException; public void refreshRow() throws java.sql.SQLException; public void insertRow() throws java.sql.SQLException; public void updateRow() throws java.sql.SQLException; public void deleteRow() throws java.sql.SQLException; public void moveToInsertRow() throws java.sql.SQLException; public void moveToCurrentRow() throws java.sql.SQLException; public boolean wasNull() throws java.sql.SQLException; public SQLWarning getWarnings() throws java.sql.SQLException; public void clearWarnings() throws java.sql.SQLException; public String getCursorName() throws java.sql.SQLException; public ResultSetMetaData getMetaData() throws java.sql.SQLException; public int findColumn(java.lang.String columnName) throws java.sql.SQLException; public String getString(int columnIndex) throws java.sql.SQLException; public boolean getBoolean(int columnIndex) throws java.sql.SQLException; public byte getByte(int columnIndex) throws java.sql.SQLException; public short getShort(int columnIndex) throws java.sql.SQLException; public int getInt(int columnIndex) throws java.sql.SQLException; public long getLong(int columnIndex) throws java.sql.SQLException; public float getFloat(int columnIndex) throws java.sql.SQLException; public double getDouble(int columnIndex) throws java.sql.SQLException; public BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException; public BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException; public byte[] getBytes(int columnIndex) throws java.sql.SQLException; public Date getDate(int columnIndex) throws java.sql.SQLException; public Time getTime(int columnIndex) throws java.sql.SQLException; public Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException; public InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException; public InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException; public InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException; public Object getObject(int columnIndex) throws java.sql.SQLException; public String getString(java.lang.String columnName) throws java.sql.SQLException; public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException; public byte getByte(java.lang.String columnName) throws java.sql.SQLException; public short getShort(java.lang.String columnName) throws java.sql.SQLException; public int getInt(java.lang.String columnName) throws java.sql.SQLException; public long getLong(java.lang.String columnName) throws java.sql.SQLException; public float getFloat(java.lang.String columnName) throws java.sql.SQLException; public double getDouble(java.lang.String columnName) throws java.sql.SQLException; public BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException; public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException; public Date getDate(java.lang.String columnName) throws java.sql.SQLException; public Time getTime(java.lang.String columnName) throws java.sql.SQLException; public Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException; public InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException; public InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException; public InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException; public Object getObject(java.lang.String columnName) throws java.sql.SQLException; public Reader getCharacterStream(int columnIndex) throws java.sql.SQLException; public Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException; public BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException; public void updateNull(int columnIndex) throws java.sql.SQLException; public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException; public void updateByte(int columnIndex, byte x) throws java.sql.SQLException; public void updateShort(int columnIndex, short x) throws java.sql.SQLException; public void updateInt(int columnIndex, int x) throws java.sql.SQLException; public void updateLong(int columnIndex, long x) throws java.sql.SQLException; public void updateFloat(int columnIndex, float x) throws java.sql.SQLException; public void updateDouble(int columnIndex, double x) throws java.sql.SQLException; public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException; public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException; public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException; public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException; public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException; public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException; public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException; public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException; public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException; public void updateNull(java.lang.String columnName) throws java.sql.SQLException; public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.SQLException; public void updateByte(java.lang.String columnName, byte x) throws java.sql.SQLException; public void updateShort(java.lang.String columnName, short x) throws java.sql.SQLException; public void updateInt(java.lang.String columnName, int x) throws java.sql.SQLException; public void updateLong(java.lang.String columnName, long x) throws java.sql.SQLException; public void updateFloat(java.lang.String columnName, float x) throws java.sql.SQLException; public void updateDouble(java.lang.String columnName, double x) throws java.sql.SQLException; public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.SQLException; public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.SQLException; public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.SQLException; public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.SQLException; public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.SQLException; public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.SQLException; public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException; public void updateCharacterStream(java.lang.String columnName, java.io.Reader x, int length) throws java.sql.SQLException; public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.SQLException; public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.SQLException; public Statement getStatement() throws java.sql.SQLException; public Object getObject(int colIndex, java.util.Map map) throws java.sql.SQLException; public Ref getRef(int colIndex) throws java.sql.SQLException; public Blob getBlob(int colIndex) throws java.sql.SQLException; public Clob getClob(int colIndex) throws java.sql.SQLException; public Array getArray(int colIndex) throws java.sql.SQLException; public Object getObject(java.lang.String colName, java.util.Map map) throws java.sql.SQLException; public Ref getRef(java.lang.String colName) throws java.sql.SQLException; public Blob getBlob(java.lang.String colName) throws java.sql.SQLException; public Clob getClob(java.lang.String colName) throws java.sql.SQLException; public Array getArray(java.lang.String colName) throws java.sql.SQLException; public Date getDate(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Date getDate(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public Time getTime(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Time getTime(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public Timestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException; public Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException; public URL getURL(int columnIndex) throws java.sql.SQLException; public URL getURL(java.lang.String columnName) throws java.sql.SQLException; public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException; public void updateRef(java.lang.String columnName, java.sql.Ref x) throws java.sql.SQLException; public void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLException; public void updateBlob(java.lang.String columnName, java.sql.Blob x) throws java.sql.SQLException; public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLException; public void updateClob(java.lang.String columnName, java.sql.Clob x) throws java.sql.SQLException; public void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLException; public void updateArray(java.lang.String columnName, java.sql.Array x) throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.BaseRowSet |
| |
openlink.javax.OPLJdbcRowSet |
Members
Method absolute(int)
Synopsis: public boolean absolute(int row) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or row is 0, or result set type is TYPE_FORWARD_ONLY. |
Move to an absolute row number in the result set.
If row is positive, moves to an absolute row with respect to the beginning of the result set. The first row is row 1, the second is row 2, etc.
If row is negative, moves to an absolute row position with respect to the end of result set. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) indicates the next-to-last row, etc.
An attempt to position the cursor beyond the first/last row in the result set, leaves the cursor before/after the first/last row, respectively.
Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
Method afterLast()
Synopsis: public void afterLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY. |
Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows.
Method beforeFirst()
Synopsis: public void beforeFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY |
Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows.
Method cancelRowUpdates()
Synopsis: public void cancelRowUpdates() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. If no updates have been made or updateRow() has already been called, then this method has no effect.
Method clearWarnings()
Synopsis: public void clearWarnings() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
After this call getWarnings returns null until a new warning is reported for this ResultSet.
Method close()
Synopsis: public void close() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
In some cases, it is desirable to immediately release a ResultSet's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.
Note: A ResultSet is automatically closed by the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet is also automatically closed when it is garbage collected.
Method deleteRow()
Synopsis: public void deleteRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row. |
Delete the current row from the result set and the underlying database. Cannot be called when on the insert row.
Method execute()
Synopsis: public void execute() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Populates the rowset with data. Execute() may use the following properties: url, data source name, user name, password, transaction isolation, and type map to create a connection for reading data. Execute may use the following properties to create a statement to execute a command: command, read only, maximum field size, maximum rows, escape processing, and query timeout. If the required properties have not been set, an exception is thrown. If successful, the current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are ignored.
Method execute(Connection)
Synopsis: public void execute(java.sql.Connection _conn) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Populates the rowset with data. Uses an existing JDBC connection object. The values of the url/data source name, user, and password properties are ignored. The command specified by the command property is executed to retrieve the data. The current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are also ignored.
Method findColumn(String)
Synopsis: public int findColumn(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Map a Resultset column name to a ResultSet column index.
Method first()
Synopsis: public boolean first() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY. |
Moves to the first row in the result set.
Method getArray(int)
Synopsis: public Array getArray(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get an array column.
Method getArray(String)
Synopsis: public Array getArray(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get an array column.
Method getAsciiStream(int)
Synopsis: public InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
Method getAsciiStream(String)
Synopsis: public InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getBigDecimal(int)
Synopsis: public BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.math.BigDecimal object.
Method getBigDecimal(int, int)
Synopsis: public BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
Get the value of a column in the current row as a java.math.BigDecimal object. |
Method getBigDecimal(String)
Synopsis: public BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException;
Get the value of a column in the current row as a java.math.BigDecimal object.
Method getBigDecimal(String, int)
Synopsis: public BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
Get the value of a column in the current row as a java.math.BigDecimal object. |
Method getBinaryStream(int)
Synopsis: public InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
Method getBinaryStream(String)
Synopsis: public InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getBlob(int)
Synopsis: public Blob getBlob(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a BLOB column.
Method getBlob(String)
Synopsis: public Blob getBlob(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a BLOB column.
Method getBoolean(int)
Synopsis: public boolean getBoolean(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java boolean.
Method getBoolean(String)
Synopsis: public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java boolean.
Method getByte(int)
Synopsis: public byte getByte(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte.
Method getByte(String)
Synopsis: public byte getByte(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte.
Method getBytes(int)
Synopsis: public byte[] getBytes(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte array. The bytes represent the raw values returned by the driver.
Method getBytes(String)
Synopsis: public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java byte array. The bytes represent the raw values returned by the driver.
Method getCharacterStream(int)
Synopsis: public Reader getCharacterStream(int columnIndex) throws java.sql.SQLException;
Get the value of a column in the current row as a java.io.Reader.
Method getCharacterStream(String)
Synopsis: public Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException;
Get the value of a column in the current row as a java.io.Reader.
Method getClob(int)
Synopsis: public Clob getClob(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a CLOB column.
Method getClob(String)
Synopsis: public Clob getClob(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a CLOB column.
Method getCursorName()
Synopsis: public String getCursorName() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if an error occurs. |
Get the name of the SQL cursor used by this ResultSet.
Method getDate(int)
Synopsis: public Date getDate(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object.
Method getDate(int, Calendar)
Synopsis: public Date getDate(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.
Method getDate(String)
Synopsis: public Date getDate(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object.
Method getDate(String, Calendar)
Synopsis: public Date getDate(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.
Method getDouble(int)
Synopsis: public double getDouble(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java double.
Method getDouble(String)
Synopsis: public double getDouble(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java double.
Method getFloat(int)
Synopsis: public float getFloat(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java float.
Method getFloat(String)
Synopsis: public float getFloat(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java float.
Method getInt(int)
Synopsis: public int getInt(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java int.
Method getInt(String)
Synopsis: public int getInt(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java int.
Method getLong(int)
Synopsis: public long getLong(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java long.
Method getLong(String)
Synopsis: public long getLong(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java long.
Method getMetaData()
Synopsis: public ResultSetMetaData getMetaData() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The number, types and properties of a ResultSet's columns are provided by the getMetaData method.
Method getObject(int)
Synopsis: public Object getObject(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC spec.
This method may also be used to read database specific abstract data types. JDBC 2.0 New behavior for getObject(). The behavior of method getObject() is extended to materialize data of SQL user-defined types. When the column @column is a structured or distinct value, the behavior of this method is as if it were a call to: getObject(column, this.getStatement().getConnection().getTypeMap()).
Method getObject(int, Map)
Synopsis: public Object getObject(int colIndex, java.util.Map map) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Returns the value of column @i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.
Method getObject(String)
Synopsis: public Object getObject(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC spec.
This method may also be used to read database specific abstract data types. JDBC 2.0 New behavior for getObject(). The behavior of method getObject() is extended to materialize data of SQL user-defined types. When the column @columnName is a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnName, this.getStatement().getConnection().getTypeMap()).
Method getObject(String, Map)
Synopsis: public Object getObject(java.lang.String colName, java.util.Map map) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Returns the value of column @i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.
Method getRef(int)
Synopsis: public Ref getRef(int colIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a REF(<structured-type>) column.
Method getRef(String)
Synopsis: public Ref getRef(java.lang.String colName) throws java.sql.SQLException;
Parameters |
---|
|
|
Get a REF(<structured-type>) column.
Method getRow()
Synopsis: public int getRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine the current row number. The first row is number 1, the second number 2, etc.
Method getShort(int)
Synopsis: public short getShort(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java short.
Method getShort(String)
Synopsis: public short getShort(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java short.
Method getStatement()
Synopsis: public Statement getStatement() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Return the Statement that produced the ResultSet.
Method getString(int)
Synopsis: public String getString(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java String.
Method getString(String)
Synopsis: public String getString(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a Java String.
Method getTime(int)
Synopsis: public Time getTime(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object.
Method getTime(int, Calendar)
Synopsis: public Time getTime(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.
Method getTime(String)
Synopsis: public Time getTime(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object.
Method getTime(String, Calendar)
Synopsis: public Time getTime(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.
Method getTimestamp(int)
Synopsis: public Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object.
Method getTimestamp(int, Calendar)
Synopsis: public Timestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.
Method getTimestamp(String)
Synopsis: public Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object.
Method getTimestamp(String, Calendar)
Synopsis: public Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.
Method getUnicodeStream(int)
Synopsis: public InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
A column value can be retrieved as a stream of Unicode characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. |
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
Method getUnicodeStream(String)
Synopsis: public InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Deprecated | |
---|---|
A column value can be retrieved as a stream of Unicode characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. |
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
Method getURL(int)
Synopsis: public URL getURL(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs, or if a URL is malformed |
Additional Information |
|
---|---|
Since |
1.4 |
Retrieves the value of the designated column in the current row
of this ResultSet
object as a
java.net.URL
object in the Java
programming language.
Method getURL(String)
Synopsis: public URL getURL(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs or if a URL is malformed |
Additional Information |
|
---|---|
Since |
1.4 |
Retrieves the value of the designated column in the current row
of this ResultSet
object as a
java.net.URL
object in the Java
programming language.
Method getWarnings()
Synopsis: public SQLWarning getWarnings() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
The first warning reported by calls on this ResultSet is returned. Subsequent ResultSet warnings will be chained to this SQLWarning.
The warning chain is automatically cleared each time a new row is read.
Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.
Method insertRow()
Synopsis: public void insertRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database access error occurs, if this method is called when the cursor is not on the insert row, or if not all of non-nullable columns in the insert row have been given a value |
Inserts the contents of the insert row into this ResultSet
objaect and into the database. The
cursor must be on the insert row when this method is called.
Method isAfterLast()
Synopsis: public boolean isAfterLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is after the last row in the result set.
Method isBeforeFirst()
Synopsis: public boolean isBeforeFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is before the first row in the result set.
Method isFirst()
Synopsis: public boolean isFirst() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is on the first row of the result set.
Method isLast()
Synopsis: public boolean isLast() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Determine if the cursor is on the last row of the result set. Note: Calling isLast() may be expensive since the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.
Method last()
Synopsis: public boolean last() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY. |
Moves to the last row in the result set.
Method moveToCurrentRow()
Synopsis: public void moveToCurrentRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the result set is not updatable |
Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row.
Method moveToInsertRow()
Synopsis: public void moveToInsertRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or the result set is not updatable |
Move to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updateXXX() methods prior to inserting the row into the result set. Only the updateXXX(), getXXX(), and insertRow() methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow(). UpdateXXX()must be called before getXXX() on a column.
Method next()
Synopsis: public boolean next() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.
If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read.
Method previous()
Synopsis: public boolean previous() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or result set type is TYPE_FORWAR_DONLY. |
Moves to the previous row in the result set.
Note: previous() is not the same as relative(-1) since it makes sense to call previous() when there is no current row.
Method refreshRow()
Synopsis: public void refreshRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row. |
Refresh the value of the current row with its current value in the database. Cannot be called when on the insert row. The refreshRow() method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow() when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one. All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow() is called after calling updateXXX(), but before calling updateRow() then the updates made to the row are lost. Calling refreshRow() frequently will likely slow performance.
Method relative(int)
Synopsis: public boolean relative(int rows) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or there is no current row, or result set type is TYPE_FORWARD_ONLY. |
Moves a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.
Note: Calling relative(1) is different than calling next() since is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.
Method rowDeleted()
Synopsis: public boolean rowDeleted() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.deletesAreDetected |
Determine if this row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not the result set can detect deletions.
Method rowInserted()
Synopsis: public boolean rowInserted() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.insertsAreDetected |
Determine if the current row has been inserted. The value returned depends on whether or not the result set can detect visible inserts.
Method rowUpdated()
Synopsis: public boolean rowUpdated() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.DatabaseMetaData.updatesAreDetected |
Determine if the current row has been updated. The value returned depends on whether or not the result set can detect updates.
Method updateArray(int, Array)
Synopsis: public void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Array
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateArray(String, Array)
Synopsis: public void updateArray(java.lang.String columnName, java.sql.Array x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Array
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateAsciiStream(int, InputStream, int)
Synopsis: public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateAsciiStream(String, InputStream, int)
Synopsis: public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBigDecimal(int, BigDecimal)
Synopsis: public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBigDecimal(String, BigDecimal)
Synopsis: public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBinaryStream(int, InputStream, int)
Synopsis: public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBinaryStream(String, InputStream, int)
Synopsis: public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBlob(int, Blob)
Synopsis: public void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Blob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateBlob(String, Blob)
Synopsis: public void updateBlob(java.lang.String columnName, java.sql.Blob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Blob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateBoolean(int, boolean)
Synopsis: public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBoolean(String, boolean)
Synopsis: public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateByte(int, byte)
Synopsis: public void updateByte(int columnIndex, byte x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateByte(String, byte)
Synopsis: public void updateByte(java.lang.String columnName, byte x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBytes(int, byte[])
Synopsis: public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateBytes(String, byte[])
Synopsis: public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateCharacterStream(int, Reader, int)
Synopsis: public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateCharacterStream(String, Reader, int)
Synopsis: public void updateCharacterStream(java.lang.String columnName, java.io.Reader x, int length) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateClob(int, Clob)
Synopsis: public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Clob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateClob(String, Clob)
Synopsis: public void updateClob(java.lang.String columnName, java.sql.Clob x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Clob
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateDate(int, Date)
Synopsis: public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDate(String, Date)
Synopsis: public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDouble(int, double)
Synopsis: public void updateDouble(int columnIndex, double x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateDouble(String, double)
Synopsis: public void updateDouble(java.lang.String columnName, double x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateFloat(int, float)
Synopsis: public void updateFloat(int columnIndex, float x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateFloat(String, float)
Synopsis: public void updateFloat(java.lang.String columnName, float x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateInt(int, int)
Synopsis: public void updateInt(int columnIndex, int x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateInt(String, int)
Synopsis: public void updateInt(java.lang.String columnName, int x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateLong(int, long)
Synopsis: public void updateLong(int columnIndex, long x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateLong(String, long)
Synopsis: public void updateLong(java.lang.String columnName, long x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateNull(int)
Synopsis: public void updateNull(int columnIndex) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Give a nullable column a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateNull(String)
Synopsis: public void updateNull(java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(int, Object)
Synopsis: public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(int, Object, int)
Synopsis: public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(String, Object)
Synopsis: public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateObject(String, Object, int)
Synopsis: public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateRef(int, Ref)
Synopsis: public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Ref
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateRef(String, Ref)
Synopsis: public void updateRef(java.lang.String columnName, java.sql.Ref x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.4 |
Updates the designated column with a java.sql.Ref
value. The updater methods are used
to update column values in the current row or the insert row. The
updater methods do not update the underlying database; instead the
updateRow
or insertRow
methods are called to update the
database.
Method updateRow()
Synopsis: public void updateRow() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs, or if called when on the insert row |
Update the underlying database with the new contents of the current row. Cannot be called when on the insert row.
Method updateShort(int, short)
Synopsis: public void updateShort(int columnIndex, short x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateShort(String, short)
Synopsis: public void updateShort(java.lang.String columnName, short x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateString(int, String)
Synopsis: public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateString(String, String)
Synopsis: public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTime(int, Time)
Synopsis: public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTime(String, Time)
Synopsis: public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTimestamp(int, Timestamp)
Synopsis: public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method updateTimestamp(String, Timestamp)
Synopsis: public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs |
Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.
Method wasNull()
Synopsis: public boolean wasNull() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to find if the value was the SQL NULL.
11.11.7.Class OPLPooledConnection
A PooledConnection object is a connection object that provides hooks for connection pool management. A PooledConnection object represents a physical connection to a data source.
Synopsis
public class OPLPooledConnection implements PooledConnection,Cloneable { // Public Methods public void finalize() throws java.lang.Throwable; public void addConnectionEventListener( javax.sql.ConnectionEventListener parm); public void removeConnectionEventListener( javax.sql.ConnectionEventListener parm); public void close() throws java.sql.SQLException; public void closeAll() throws java.sql.SQLException; public Connection getConnection() throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLPooledConnection |
Members
Method addConnectionEventListener(ConnectionEventListener)
Synopsis: public void addConnectionEventListener( javax.sql.ConnectionEventListener parm);
Add an event listener.
Method close()
Synopsis: public void close() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Close the physical connection.
Method closeAll()
Synopsis: public void closeAll() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Close all the Statement objects that have been opened by this PooledConnection object.
Method getConnection()
Synopsis: public Connection getConnection() throws java.sql.SQLException;
Exceptions |
|
---|---|
java.sql.SQLException |
if a database-access error occurs |
Create an object handle for this physical connection. The object returned is a temporary handle used by application code to refer to a physical connection that is being pooled.
Method removeConnectionEventListener(ConnectionEventListener)
Synopsis: public void removeConnectionEventListener( javax.sql.ConnectionEventListener parm);
Remove an event listener.
11.11.8.Class OPLPoolStatistic
Synopsis
public class OPLPoolStatistic implements Cloneable { // Public Methods public int getHits(); public int getMisses(); public long getMaxWaitTime(); public long getMinWaitTime(); public long getCumWaitTime(); public int getCacheSize(); public int getConnsInUse(); public int getConnsUnUsed(); public String getName(); public String toString(); }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLPoolStatistic |
Members
Method getConnsInUse()
Synopsis: public int getConnsInUse();
Returns the amount of used connections in the connection pool size.
Method getConnsUnUsed()
Synopsis: public int getConnsUnUsed();
Returns the amount of unused connections in the connection pool size.
Method getCumWaitTime()
Synopsis: public long getCumWaitTime();
Returns the sum of all waiting time for the connection pool.
Method getMaxWaitTime()
Synopsis: public long getMaxWaitTime();
Returns the maximal waiting time for the connection pool.
Method getMinWaitTime()
Synopsis: public long getMinWaitTime();
Returns the minimal waiting time for the connection pool.
Method getMisses()
Synopsis: public int getMisses();
Returns the amount of the connection pool misses.
11.11.9.Class OPLRowSetMetaData
The RowSetMetaData interface extends ResultSetMetaData with methods that allow a metadata object to be initialized.
Synopsis
public class OPLRowSetMetaData implements RowSetMetaData,Serializable { // Public Constructors public OPLRowSetMetaData(java.sql.ResultSetMetaData rsmd) throws java.sql.SQLException; // Public Methods public void setAutoIncrement(int column, boolean property) throws java.sql.SQLException; public void setCaseSensitive(int column, boolean property) throws java.sql.SQLException; public void setCatalogName(int column, java.lang.String catalogName) throws java.sql.SQLException; public void setColumnCount(int columnCount) throws java.sql.SQLException; public void setColumnDisplaySize(int column, int size) throws java.sql.SQLException; public void setColumnLabel(int column, java.lang.String label) throws java.sql.SQLException; public void setColumnName(int column, java.lang.String columnName) throws java.sql.SQLException; public void setColumnType(int column, int SQLType) throws java.sql.SQLException; public void setColumnTypeName(int column, java.lang.String typeName) throws java.sql.SQLException; public void setCurrency(int column, boolean property) throws java.sql.SQLException; public void setNullable(int column, int property) throws java.sql.SQLException; public void setPrecision(int column, int precision) throws java.sql.SQLException; public void setScale(int column, int scale) throws java.sql.SQLException; public void setSchemaName(int column, java.lang.String schemaName) throws java.sql.SQLException; public void setSearchable(int column, boolean property) throws java.sql.SQLException; public void setSigned(int column, boolean property) throws java.sql.SQLException; public void setTableName(int column, java.lang.String tableName) throws java.sql.SQLException; public int getColumnCount() throws java.sql.SQLException; public boolean isAutoIncrement(int column) throws java.sql.SQLException; public boolean isCaseSensitive(int column) throws java.sql.SQLException; public boolean isSearchable(int column) throws java.sql.SQLException; public boolean isCurrency(int column) throws java.sql.SQLException; public int isNullable(int column) throws java.sql.SQLException; public boolean isSigned(int column) throws java.sql.SQLException; public int getColumnDisplaySize(int column) throws java.sql.SQLException; public String getColumnLabel(int column) throws java.sql.SQLException; public String getColumnName(int column) throws java.sql.SQLException; public String getSchemaName(int column) throws java.sql.SQLException; public int getPrecision(int column) throws java.sql.SQLException; public int getScale(int column) throws java.sql.SQLException; public String getTableName(int column) throws java.sql.SQLException; public String getCatalogName(int column) throws java.sql.SQLException; public int getColumnType(int column) throws java.sql.SQLException; public String getColumnTypeName(int column) throws java.sql.SQLException; public boolean isReadOnly(int column) throws java.sql.SQLException; public boolean isWritable(int column) throws java.sql.SQLException; public boolean isDefinitelyWritable(int column) throws java.sql.SQLException; public String getColumnClassName(int column) throws java.sql.SQLException; }
Inheritance Path |
---|
java.lang.Object |
| |
openlink.javax.OPLRowSetMetaData |
Members
Method getCatalogName(int)
Synopsis: public String getCatalogName(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Gets the designated column's table's catalog name.
Method getColumnClassName(int)
Synopsis: public String getColumnClassName(int column) throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
Since |
1.2 |
See Also |
Returns the fully-qualified name of the Java class whose
instances are manufactured if the method ResultSet.getObject
is called to retrieve a value
from the column. ResultSet.getObject
may return a subclass of the class returned by this method.
Method getColumnCount()
Synopsis: public int getColumnCount() throws java.sql.SQLException;
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Returns the number of columns in this RowSet
Method getColumnDisplaySize(int)
Synopsis: public int getColumnDisplaySize(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates the designated column's normal maximum width in characters.
Method getColumnLabel(int)
Synopsis: public String getColumnLabel(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Gets the designated column's suggested title for use in printouts and displays.
Method getColumnName(int)
Synopsis: public String getColumnName(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Get the designated column's name.
Method getColumnType(int)
Synopsis: public int getColumnType(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Additional Information |
|
---|---|
See Also |
java.sql.Types |
Retrieves the designated column's SQL type.
Method getColumnTypeName(int)
Synopsis: public String getColumnTypeName(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Retrieves the designated column's database-specific type name.
Method getPrecision(int)
Synopsis: public int getPrecision(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Get the designated column's number of decimal digits.
Method getScale(int)
Synopsis: public int getScale(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Gets the designated column's number of digits to right of the decimal point.
Method getSchemaName(int)
Synopsis: public String getSchemaName(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Get the designated column's table's schema.
Method getTableName(int)
Synopsis: public String getTableName(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Gets the designated column's table name.
Method isAutoIncrement(int)
Synopsis: public boolean isAutoIncrement(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether the column is automatically numbered, thus read-only.
Method isCaseSensitive(int)
Synopsis: public boolean isCaseSensitive(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether a column's case matters.
Method isCurrency(int)
Synopsis: public boolean isCurrency(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether the designated column is a cash value.
Method isDefinitelyWritable(int)
Synopsis: public boolean isDefinitelyWritable(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether a write on the designated column will definitely succeed.
Method isNullable(int)
Synopsis: public int isNullable(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates the nullability of values in the designated column.
Method isReadOnly(int)
Synopsis: public boolean isReadOnly(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether the designated column is definitely not writable.
Method isSearchable(int)
Synopsis: public boolean isSearchable(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether the designated column can be used in a where clause.
Method isSigned(int)
Synopsis: public boolean isSigned(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether values in the designated column are signed numbers.
Method isWritable(int)
Synopsis: public boolean isWritable(int column) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database access error occurs |
Indicates whether it is possible for a write on the designated column to succeed.
Method setAutoIncrement(int, boolean)
Synopsis: public void setAutoIncrement(int column, boolean property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify whether the is column automatically numbered, thus read-only.
Method setCaseSensitive(int, boolean)
Synopsis: public void setCaseSensitive(int column, boolean property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify whether the column is case sensitive.
Method setCatalogName(int, String)
Synopsis: public void setCatalogName(int column, java.lang.String catalogName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's table's catalog name, if any.
Method setColumnCount(int)
Synopsis: public void setColumnCount(int columnCount) throws java.sql.SQLException;
Parameters |
---|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Set the number of columns in the RowSet.
Method setColumnDisplaySize(int, int)
Synopsis: public void setColumnDisplaySize(int column, int size) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's normal max width in chars.
Method setColumnLabel(int, String)
Synopsis: public void setColumnLabel(int column, java.lang.String label) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the suggested column title for use in printouts and displays, if any.
Method setColumnName(int, String)
Synopsis: public void setColumnName(int column, java.lang.String columnName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column name.
Method setColumnType(int, int)
Synopsis: public void setColumnType(int column, int SQLType) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Additional Information |
|
---|---|
See Also |
java.sql.Types |
Specify the column's SQL type.
Method setColumnTypeName(int, String)
Synopsis: public void setColumnTypeName(int column, java.lang.String typeName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's data source specific type name, if any.
Method setCurrency(int, boolean)
Synopsis: public void setCurrency(int column, boolean property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify whether the column is a cash value.
Method setNullable(int, int)
Synopsis: public void setNullable(int column, int property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify whether the column's value can be set to NULL.
Method setPrecision(int, int)
Synopsis: public void setPrecision(int column, int precision) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's number of decimal digits.
Method setScale(int, int)
Synopsis: public void setScale(int column, int scale) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's number of digits to right of the decimal point.
Method setSchemaName(int, String)
Synopsis: public void setSchemaName(int column, java.lang.String schemaName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's table's schema, if any.
Method setSearchable(int, boolean)
Synopsis: public void setSearchable(int column, boolean property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify whether the column can be used in a where clause.
Method setSigned(int, boolean)
Synopsis: public void setSigned(int column, boolean property) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Speicfy whether the column is a signed number.
Method setTableName(int, String)
Synopsis: public void setTableName(int column, java.lang.String tableName) throws java.sql.SQLException;
Parameters |
---|
|
|
Exceptions |
|
---|---|
SQLException |
if a database-access error occurs. |
Specify the column's table name, if any.