• Topic
  • Discussion
  • UdaWikiWeb.ClassOPLCachedRowSet(Last) -- Owiki? , 2016-08-19 14:59:42 Edit owiki 2016-08-19 14:59:42

    Class OPLCachedRowSet

    OPLCachedRowSet Classes 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()

    OPLCachedRowSet Methods 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)

    absolute Methods absolute
    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()

    acceptChanges Methods 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)

    acceptChanges Methods acceptChanges
    Synopsis: public void acceptChanges(java.sql.Connection _conn)
    throws java.sql.SQLException;

    Parameters

    • _conn - a database connection

    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()

    afterLast Methods 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()

    beforeFirst Methods 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()

    cancelRowDelete Methods 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()

    cancelRowInsert Methods 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()

    cancelRowUpdates Methods 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()

    clearWarnings Methods 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()

    close Methods 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)

    columnUpdated Methods columnUpdated
    Synopsis: public boolean columnUpdated(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - true if the column has been updated

    Exceptions

    SQLException

    if a database-access error occurs

    Determine if the column from the current row has been updated.

    Method createCopy()

    createCopy Methods 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()

    createShared Methods 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()

    deleteRow Methods 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()

    execute Methods 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)

    execute Methods execute
    Synopsis: public void execute(java.sql.Connection _conn)
    throws java.sql.SQLException;

    Parameters

    • _conn - a database connection

    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)

    findColumn Methods findColumn
    Synopsis: public int findColumn(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • return - the column index

    Exceptions

    SQLException

    if a database-access error occurs.

    Map a Resultset column name to a ResultSet column index.

    Method first()

    first Methods 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)

    getArray Methods getArray
    Synopsis: public Array getArray(int colIndex) throws java.sql.SQLException;

    Parameters

    • colIndex - the first column is 1, the second is 2, ...
    • return - an object representing an SQL array

    Get an array column.

    Method getArray(String)

    getArray Methods getArray
    Synopsis: public Array getArray(java.lang.String colName)
    throws java.sql.SQLException;

    Parameters

    • colName - the column name
    • return - an object representing an SQL array

    Get an array column.

    Method getAsciiStream(int)

    getAsciiStream Methods getAsciiStream
    Synopsis: public InputStream getAsciiStream(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - a Java input stream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null.

    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)

    getAsciiStream Methods getAsciiStream
    Synopsis: public InputStream getAsciiStream(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - a Java input stream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null.

    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)

    getBigDecimal Methods getBigDecimal
    Synopsis: public BigDecimal getBigDecimal(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value (full precision); if the value is SQL NULL, the result is null

    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)

    getBigDecimal Methods getBigDecimal
    Synopsis: public BigDecimal getBigDecimal(int columnIndex, int scale)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • scale - the number of digits to the right of the decimal
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getBigDecimal Methods getBigDecimal
    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)

    getBigDecimal Methods getBigDecimal
    Synopsis: public BigDecimal getBigDecimal(java.lang.String columnName,
    int scale)
    throws java.sql.SQLException;


    Parameters

    columnName - is the SQL name of the column

    scale - the number of digits to the right of the decimal

    return - the column value; if the value is SQL NULL, the result is null

    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.

    11.11.2.2.28. Method getBinaryStream(int)
    getBinaryStream Methods getBinaryStream

    Synopsis: public InputStream getBinaryStream(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - a Java input stream that delivers the database column value as a stream of uninterpreted bytes. If the value is SQL NULL then the result is null.

    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)

    getBinaryStream Methods getBinaryStream
    Synopsis: public InputStream getBinaryStream(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - a Java input stream that delivers the database column value as a stream of uninterpreted bytes. If the value is SQL NULL then the result is null.

    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)

    getBlob Methods getBlob
    Synopsis: public Blob getBlob(int colIndex) throws java.sql.SQLException;

    Parameters

    • colIndex - the first column is 1, the second is 2, ...
    • return - an object representing a BLOB

    Get a BLOB column.

    Method getBlob(String)

    getBlob Methods getBlob
    Synopsis: public Blob getBlob(java.lang.String colName)
    throws java.sql.SQLException;

    Parameters

    • colName - the column name
    • return - an object representing a BLOB

    Get a BLOB column.

    Method getBoolean(int)

    getBoolean Methods getBoolean
    Synopsis: public boolean getBoolean(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is false

    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)

    getBoolean Methods getBoolean
    Synopsis: public boolean getBoolean(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is false

    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)

    getByte Methods getByte
    Synopsis: public byte getByte(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getByte Methods getByte
    Synopsis: public byte getByte(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getBytes Methods getBytes
    Synopsis: public byte[] getBytes(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getBytes Methods getBytes
    Synopsis: public byte[] getBytes(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getCharacterStream Methods getCharacterStream
    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)

    getCharacterStream Methods getCharacterStream
    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)

    getClob Methods getClob
    Synopsis: public Clob getClob(int colIndex) throws java.sql.SQLException;

    Parameters

    • colIndex - the first column is 1, the second is 2, ...
    • return - an object representing a CLOB

    Get a CLOB column.

    Method getClob(String)

    getClob Methods getClob
    Synopsis: public Clob getClob(java.lang.String colName)
    throws java.sql.SQLException;

    Parameters

    • colName - the column name
    • return - an object representing a CLOB

    Get a CLOB column.

    Method getConnection()

    getConnection Methods 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()

    getCursorName Methods 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)

    getDate Methods getDate
    Synopsis: public Date getDate(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getDate Methods getDate
    Synopsis: public Date getDate(int columnIndex, java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • cal - the calendar to use in constructing the date
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getDate Methods getDate
    Synopsis: public Date getDate(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getDate Methods getDate
    Synopsis: public Date getDate(java.lang.String columnName,
    java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • cal - the calendar to use in constructing the date
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getDouble Methods getDouble
    Synopsis: public double getDouble(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getDouble Methods getDouble
    Synopsis: public double getDouble(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getFloat Methods getFloat
    Synopsis: public float getFloat(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getFloat Methods getFloat
    Synopsis: public float getFloat(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getInt Methods getInt
    Synopsis: public int getInt(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getInt Methods getInt
    Synopsis: public int getInt(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    Exceptions

    SQLException

    if a database-access error occurs.

    Get the value of a column in the current row as a Java int.

    Method getKeyCols()

    getKeyCols Methods 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)

    getLong Methods getLong
    Synopsis: public long getLong(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getLong Methods getLong
    Synopsis: public long getLong(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    Exceptions

    SQLException

    if a database-access error occurs.

    Get the value of a column in the current row as a Java long.

    Method getMetaData()

    getMetaData Methods 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)

    getObject Methods getObject
    Synopsis: public Object getObject(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - a java.lang.Object holding the column value.

    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)

    getObject Methods getObject
    Synopsis: public Object getObject(int colIndex, java.util.Map map)
    throws java.sql.SQLException;

    Parameters

    • colIndex - the first column is 1, the second is 2, ...
    • map - the mapping from SQL type names to Java classes
    • return - an object representing the SQL value

    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)

    getObject Methods getObject
    Synopsis: public Object getObject(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - a java.lang.Object holding the column value.

    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)

    getObject Methods getObject
    Synopsis: public Object getObject(java.lang.String colName, java.util.Map map)
    throws java.sql.SQLException;

    Parameters

    • colName - the column name
    • map - the mapping from SQL type names to Java classes
    • return - an object representing the SQL value

    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()

    getOriginal Methods 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()

    getOriginalRow Methods 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)

    getRef Methods getRef
    Synopsis: public Ref getRef(int colIndex) throws java.sql.SQLException;

    Parameters

    • colIndex - the first column is 1, the second is 2, ...
    • return - an object representing data of an SQL REF type

    Get a REF(<structured-type>) column.

    Method getRef(String)

    getRef Methods getRef
    Synopsis: public Ref getRef(java.lang.String colName)
    throws java.sql.SQLException;

    Parameters

    • colName - the column name
    • return - an object representing data of an SQL REF type

    Get a REF(<structured-type>) column.

    Method getRow()

    getRow Methods 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)

    getShort Methods getShort
    Synopsis: public short getShort(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is 0

    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)

    getShort Methods getShort
    Synopsis: public short getShort(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is 0

    Exceptions

    SQLException

    if a database-access error occurs.

    Get the value of a column in the current row as a Java short.

    Method getShowDeleted()

    getShowDeleted Methods 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()

    getStatement Methods 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)

    getString Methods getString
    Synopsis: public String getString(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getString Methods getString
    Synopsis: public String getString(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is null

    Exceptions

    SQLException

    if a database-access error occurs.

    Get the value of a column in the current row as a Java String.

    Method getTableName()

    getTableName Methods 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)

    getTime Methods getTime
    Synopsis: public Time getTime(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTime Methods getTime
    Synopsis: public Time getTime(int columnIndex, java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • cal - the calendar to use in constructing the time
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTime Methods getTime
    Synopsis: public Time getTime(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTime Methods getTime
    Synopsis: public Time getTime(java.lang.String columnName,
    java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • cal - the calendar to use in constructing the time
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTimestamp Methods getTimestamp
    Synopsis: public Timestamp getTimestamp(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTimestamp Methods getTimestamp
    Synopsis: public Timestamp getTimestamp(int columnIndex,
    java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • cal - the calendar to use in constructing the timestamp
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTimestamp Methods getTimestamp
    Synopsis: public Timestamp getTimestamp(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getTimestamp Methods getTimestamp
    Synopsis: public Timestamp getTimestamp(java.lang.String columnName,
    java.util.Calendar cal)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • cal - the calendar to use in constructing the timestamp
    • return - the column value; if the value is SQL NULL, the result is null

    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)

    getUnicodeStream Methods getUnicodeStream
    Synopsis: public InputStream getUnicodeStream(int columnIndex)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • return - a Java input stream that delivers the database column value as a stream of two byte Unicode characters. If the value is SQL NULL then the result is null.

    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)

    getUnicodeStream Methods getUnicodeStream
    Synopsis: public InputStream getUnicodeStream(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - is the SQL name of the column
    • return - a Java input stream that delivers the database column value as a stream of two byte Unicode characters. If the value is SQL NULL then the result is null.

    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)

    getURL Methods getURL
    Synopsis: public URL getURL(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the index of the column 1 is the first, 2 is the second,...

    8 return - the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language

    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)

    getURL Methods getURL
    Synopsis: public URL getURL(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    • columnName - the SQL name of the column
    • return - the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language

    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()

    getWarnings Methods 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()

    insertRow Methods 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()

    isAfterLast Methods 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()

    isBeforeFirst Methods 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()

    isFirst Methods 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()

    isLast Methods 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()

    last Methods 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()

    moveToCurrentRow Methods 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()

    moveToInsertRow Methods 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()

    next Methods 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)

    populate Methods populate
    Synopsis: public void populate(java.sql.ResultSet rs)
    throws java.sql.SQLException;

    Parameters

    • rs - the data to be read

    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()

    previous Methods 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()

    refreshRow Methods 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)

    relative Methods relative
    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()

    release Methods 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()

    restoreOriginal Methods 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()

    rowDeleted Methods 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()

    rowInserted Methods 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()

    rowUpdated Methods 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)

    setCommand Methods setCommand
    Synopsis: public void setCommand(java.lang.String cmd)
    throws java.sql.SQLException;

    Parameters

    • cmd - - a String object containing an SQL query that will be set as the command

    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)

    setConcurrency Methods setConcurrency
    Synopsis: public void setConcurrency(int concurrency)
    throws java.sql.SQLException;

    Parameters

    • concurrency - - one of the following constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE

    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[])

    setKeyColumns Methods setKeyColumns
    Synopsis: public void setKeyColumns(int[] keys) throws java.sql.SQLException;

    Parameters

    • keys - - an array of int indicating the columns that form a key for this OPLCachedRowSet object; every element in the array must be greater than 0 and less than or equal to the number of columns in this rowset

    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)

    setMetaData Methods setMetaData
    Synopsis: public void setMetaData(javax.sql.RowSetMetaData md)
    throws java.sql.SQLException;

    Parameters

    • md - a metadata object

    Exceptions

    SQLException

    if a database-access error occurs.

    Set the rowset's metadata.

    Method setOriginal()

    setOriginal Methods 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()

    setOriginalRow Methods 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)

    setShowDeleted Methods setShowDeleted
    Synopsis: public void setShowDeleted(boolean value)
    throws java.sql.SQLException;

    Parameters

    • value - true if deleted rows should be shown, false otherwise

    Exceptions

    SQLException

    if an error occurs.

    Set the show deleted property.

    Method setTableName(String)

    setTableName Methods setTableName
    Synopsis: public void setTableName(java.lang.String _tableName)
    throws java.sql.SQLException;

    Parameters

    • _tabName - - a String object that identifies the table from which this OPLCachedRowSet object was derived

    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()

    size Methods size
    Synopsis: public int size();

    Returns the number of rows in this OPLCachedRowSet object.

    Method toCollection()

    toCollection Methods 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)

    toCollection Methods toCollection
    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)

    updateArray Methods updateArray
    Synopsis: public void updateArray(int columnIndex, java.sql.Array x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateArray Methods updateArray
    Synopsis: public void updateArray(java.lang.String columnName,
    java.sql.Array x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateAsciiStream Methods updateAsciiStream
    Synopsis: public void updateAsciiStream(int columnIndex, java.io.InputStream x,
    int length)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    8 length - the length of the stream

    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)

    updateAsciiStream Methods updateAsciiStream
    Synopsis: public void updateAsciiStream(java.lang.String columnName,
    java.io.InputStream x,
    int length)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value
    • length - of the stream

    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)

    updateBigDecimal Methods updateBigDecimal
    Synopsis: public void updateBigDecimal(int columnIndex, java.math.BigDecimal x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateBigDecimal Methods updateBigDecimal
    Synopsis: public void updateBigDecimal(java.lang.String columnName,
    java.math.BigDecimal x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateBinaryStream Methods updateBinaryStream
    Synopsis: public void updateBinaryStream(int columnIndex,
    java.io.InputStream x, int length)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value
    • length - the length of the stream

    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)

    updateBinaryStream Methods updateBinaryStream
    Synopsis: public void updateBinaryStream(java.lang.String columnName,
    java.io.InputStream x,
    int length)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value
    • length - of the stream

    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)

    updateBlob Methods updateBlob
    Synopsis: public void updateBlob(int columnIndex, java.sql.Blob x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateBlob Methods updateBlob
    Synopsis: public void updateBlob(java.lang.String columnName, java.sql.Blob x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateBoolean Methods updateBoolean
    Synopsis: public void updateBoolean(int columnIndex, boolean x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateBoolean Methods updateBoolean
    Synopsis: public void updateBoolean(java.lang.String columnName, boolean x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateByte Methods updateByte
    Synopsis: public void updateByte(int columnIndex, byte x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateByte Methods updateByte
    Synopsis: public void updateByte(java.lang.String columnName, byte x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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[])

    updateBytes Methods updateBytes
    Synopsis: public void updateBytes(int columnIndex, byte[] x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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[])

    updateBytes Methods updateBytes
    Synopsis: public void updateBytes(java.lang.String columnName, byte[] x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateCharacterStream Methods updateCharacterStream
    Synopsis: public void updateCharacterStream(int columnIndex, java.io.Reader x,
    int length)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value
    • length - the length of the stream

    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)

    updateCharacterStream Methods updateCharacterStream
    Synopsis: public void updateCharacterStream(java.lang.String columnName,
    java.io.Reader reader,
    int length)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value
    • length - of the stream

    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)

    updateClob Methods updateClob
    Synopsis: public void updateClob(int columnIndex, java.sql.Clob x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateClob Methods updateClob
    Synopsis: public void updateClob(java.lang.String columnName, java.sql.Clob x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateDate Methods updateDate
    Synopsis: public void updateDate(int columnIndex, java.sql.Date x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateDate Methods updateDate
    Synopsis: public void updateDate(java.lang.String columnName, java.sql.Date x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateDouble Methods updateDouble
    Synopsis: public void updateDouble(int columnIndex, double x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateDouble Methods updateDouble
    Synopsis: public void updateDouble(java.lang.String columnName, double x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateFloat Methods updateFloat
    Synopsis: public void updateFloat(int columnIndex, float x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateFloat Methods updateFloat
    Synopsis: public void updateFloat(java.lang.String columnName, float x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateInt Methods updateInt
    Synopsis: public void updateInt(int columnIndex, int x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateInt Methods updateInt
    Synopsis: public void updateInt(java.lang.String columnName, int x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateLong Methods updateLong
    Synopsis: public void updateLong(int columnIndex, long x)
    throws java.sql.SQLException;

    Parameters

    * columnIndex - the first column is 1, the second is 2, ...

    • x - the new column value

    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)

    updateLong Methods updateLong
    Synopsis: public void updateLong(java.lang.String columnName, long x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateNull Methods updateNull
    Synopsis: public void updateNull(int columnIndex) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...

    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)

    updateNull Methods updateNull
    Synopsis: public void updateNull(java.lang.String columnName)
    throws java.sql.SQLException;

    Parameters

    * columnName - the name of the column

    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)

    updateObject Methods updateObject
    Synopsis: public void updateObject(int columnIndex, java.lang.Object x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateObject Methods updateObject
    Synopsis: public void updateObject(int columnIndex, java.lang.Object x,
    int scale) throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value
    • scale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.

    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)

    updateObject Methods updateObject
    Synopsis: public void updateObject(java.lang.String columnName,
    java.lang.Object x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateObject Methods updateObject
    Synopsis: public void updateObject(java.lang.String columnName,
    java.lang.Object x, int scale)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value
    • scale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.

    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)

    updateRef Methods updateRef
    Synopsis: public void updateRef(int columnIndex, java.sql.Ref x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateRef Methods updateRef
    Synopsis: public void updateRef(java.lang.String columnName, java.sql.Ref x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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()

    updateRow Methods 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)

    updateShort Methods updateShort
    Synopsis: public void updateShort(int columnIndex, short x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateShort Methods updateShort
    Synopsis: public void updateShort(java.lang.String columnName, short x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateString Methods updateString
    Synopsis: public void updateString(int columnIndex, java.lang.String x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateString Methods updateString
    Synopsis: public void updateString(java.lang.String columnName,
    java.lang.String x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateTime Methods updateTime
    Synopsis: public void updateTime(int columnIndex, java.sql.Time x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateTime Methods updateTime
    Synopsis: public void updateTime(java.lang.String columnName, java.sql.Time x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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)

    updateTimestamp Methods updateTimestamp
    Synopsis: public void updateTimestamp(int columnIndex, java.sql.Timestamp x)
    throws java.sql.SQLException;

    Parameters

    • columnIndex - the first column is 1, the second is 2, ...
    • x - the new column value

    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)

    updateTimestamp Methods updateTimestamp
    Synopsis: public void updateTimestamp(java.lang.String columnName,
    java.sql.Timestamp x)
    throws java.sql.SQLException;

    Parameters

    • columnName - the name of the column
    • x - the new column value

    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()

    wasNull Methods 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.


    Referenced by...