com.sun.rowset
Class FilteredRowSetImpl

java.lang.Object
  extended byjavax.sql.rowset.BaseRowSet
      extended bycom.sun.rowset.CachedRowSetImpl
          extended bycom.sun.rowset.WebRowSetImpl
              extended bycom.sun.rowset.FilteredRowSetImpl
All Implemented Interfaces:
CachedRowSet, java.lang.Cloneable, FilteredRowSet, Joinable, java.sql.ResultSet, javax.sql.RowSet, javax.sql.RowSetInternal, java.io.Serializable, WebRowSet

public class FilteredRowSetImpl
extends WebRowSetImpl
implements java.io.Serializable, java.lang.Cloneable, FilteredRowSet

The standard implementation of the FilteredRowSet interface. See the interface defintion for full behaviour and implementation requirements.

Author:
Jonathan Bruce, Amit Handa
See Also:
Predicate, Serialized Form

Field Summary
 
Fields inherited from class javax.sql.rowset.BaseRowSet
ASCII_STREAM_PARAM, asciiStream, BINARY_STREAM_PARAM, binaryStream, charStream, UNICODE_STREAM_PARAM, unicodeStream
 
Fields inherited from interface javax.sql.rowset.WebRowSet
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_ID
 
Fields inherited from interface javax.sql.rowset.CachedRowSet
COMMIT_ON_ACCEPT_CHANGES
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Constructor Summary
FilteredRowSetImpl()
          Construct a FilteredRowSet
FilteredRowSetImpl(java.util.Hashtable env)
          Construct a FilteredRowSet with a specified synchronization provider.
 
Method Summary
 boolean absolute(int rows)
          Moves this CachedRowSetImpl object's cursor to the row number specified.
 Predicate getFilter()
          Retrieve the filter active for this FilteredRowSet
 void insertRow()
          Inserts the contents of this CachedRowSetImpl object's insert row into this rowset immediately following the current row.
protected  boolean internalFirst()
          Over-riding internalFirst() implementation.
protected  boolean internalLast()
          Over-riding internalLast() implementation.
protected  boolean internalNext()
          Over-riding internalNext() implementation.
protected  boolean internalPrevious()
          Over-riding internalPrevious() implementation.
 void moveToInsertRow()
          Moves the cursor for this CachedRowSetImpl object to the insert row.
 boolean relative(int rows)
          Moves the cursor the specified number of rows from the current position, with a positive number moving it forward and a negative number moving it backward.
 void setFilter(Predicate p)
          Apply the predicate for this filter
 void updateAsciiStream(int columnIndex, java.io.InputStream x, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given ASCII stream value.
 void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given ASCII stream value.
 void updateBigDecimal(int columnIndex, java.math.BigDecimal x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.math.BigDecimal object.
 void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.math.BigDecimal object.
 void updateBinaryStream(int columnIndex, java.io.InputStream x, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.InputStream object.
 void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.InputStream object.
 void updateBoolean(int columnIndex, boolean x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given boolean value.
 void updateBoolean(java.lang.String columnName, boolean x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given boolean value.
 void updateByte(int columnIndex, byte x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte value.
 void updateByte(java.lang.String columnName, byte x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte value.
 void updateBytes(int columnIndex, byte[] x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte array.
 void updateBytes(java.lang.String columnName, byte[] x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte array.
 void updateCahracterStream(int columnIndex, java.io.Reader x, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.Reader object.
 void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.Reader object.
 void updateDate(int columnIndex, java.sql.Date x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object.
 void updateDate(java.lang.String columnName, java.sql.Date x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object.
 void updateDouble(int columnIndex, double x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given double value.
 void updateDouble(java.lang.String columnName, double x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given double value.
 void updateFloat(int columnIndex, float x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given float value.
 void updateFloat(java.lang.String columnName, float x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given float value.
 void updateInt(int columnIndex, int x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given int value.
 void updateInt(java.lang.String columnName, int x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given int value.
 void updateLong(int columnIndex, long x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given long value.
 void updateLong(java.lang.String columnName, long x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given long value.
 void updateObject(int columnIndex, java.lang.Object x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.
 void updateObject(int columnIndex, java.lang.Object x, int scale)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.
 void updateObject(java.lang.String columnName, java.lang.Object x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.
 void updateObject(java.lang.String columnName, java.lang.Object x, int scale)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.
 void updateShort(int columnIndex, short x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given short value.
 void updateShort(java.lang.String columnName, short x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given short value.
 void updateString(int columnIndex, java.lang.String x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given String object.
 void updateString(java.lang.String columnName, java.lang.String x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given String object.
 void updateTime(int columnIndex, java.sql.Time x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object.
 void updateTime(java.lang.String columnName, java.sql.Time x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object.
 void updateTimestamp(int columnIndex, java.sql.Timestamp x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Timestamp object.
 void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Timestamp object.
 
Methods inherited from class com.sun.rowset.WebRowSetImpl
readXml, readXml, writeXml, writeXml, writeXml, writeXml
 
Methods inherited from class com.sun.rowset.CachedRowSetImpl
acceptChanges, acceptChanges, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, clone, close, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, deleteRow, execute, execute, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConnection, getCurrentRow, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getKeyColumns, getLong, getLong, getMatchColumnIndexes, getMatchColumnNames, getMetaData, getObject, getObject, getObject, getObject, getOriginal, getOriginalRow, getPageSize, getRef, getRef, getRow, getRowSetWarnings, getShort, getShort, getStatement, getString, getString, getSyncProvider, getTableName, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, next, nextPage, populate, populate, previous, previousPage, refreshRow, release, removeCurrentRow, restoreOriginal, rollback, rollback, rowDeleted, rowInserted, rowSetPopulated, rowUpdated, setCommand, setKeyColumns, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, setMetaData, setOriginal, setOriginalRow, setPageSize, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, updateArray, updateArray, updateBlob, updateBlob, updateCharacterStream, updateClob, updateClob, updateNull, updateNull, updateRef, updateRef, updateRow, wasNull
 
Methods inherited from class javax.sql.rowset.BaseRowSet
addRowSetListener, clearParameters, getCommand, getConcurrency, getDataSourceName, getEscapeProcessing, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getParams, getPassword, getQueryTimeout, getShowDeleted, getTransactionIsolation, getType, getTypeMap, getUrl, getUsername, initParams, isReadOnly, notifyCursorMoved, notifyRowChanged, notifyRowSetChanged, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setShowDeleted, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setUsername
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.rowset.WebRowSet
readXml, readXml, writeXml, writeXml, writeXml, writeXml
 
Methods inherited from interface javax.sql.rowset.CachedRowSet
acceptChanges, acceptChanges, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, execute, getKeyColumns, getOriginal, getOriginalRow, getPageSize, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, nextPage, populate, populate, previousPage, release, restoreOriginal, rollback, rollback, rowSetPopulated, setKeyColumns, setMetaData, setOriginalRow, setPageSize, setShowDeleted, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate
 
Methods inherited from interface javax.sql.RowSet
addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setUsername
 
Methods inherited from interface java.sql.ResultSet
afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, next, previous, refreshRow, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateBlob, updateBlob, updateCharacterStream, updateClob, updateClob, updateNull, updateNull, updateRef, updateRef, updateRow, wasNull
 
Methods inherited from interface javax.sql.rowset.Joinable
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn
 
Methods inherited from interface javax.sql.RowSetInternal
getParams
 

Constructor Detail

FilteredRowSetImpl

public FilteredRowSetImpl()
                   throws java.sql.SQLException
Construct a FilteredRowSet


FilteredRowSetImpl

public FilteredRowSetImpl(java.util.Hashtable env)
                   throws java.sql.SQLException
Construct a FilteredRowSet with a specified synchronization provider.

Parameters:
env - a Hashtable containing a desired synchconizatation provider name-value pair.
Method Detail

setFilter

public void setFilter(Predicate p)
               throws java.sql.SQLException
Apply the predicate for this filter

Specified by:
setFilter in interface FilteredRowSet
Parameters:
p - an implementation of the predicate interface
Throws:
java.sql.SQLException - if an error occurs when setting the Predicate object

getFilter

public Predicate getFilter()
Retrieve the filter active for this FilteredRowSet

Specified by:
getFilter in interface FilteredRowSet
Returns:
a Predicate object instance

internalNext

protected boolean internalNext()
                        throws java.sql.SQLException
Over-riding internalNext() implementation. This method applies the filter on the RowSet each time the cursor is advanced or manipulated. It moves the cursor to the next row according to the set predicate and returns true if the cursor is still within the rowset or false if the cursor position is over the last row

Overrides:
internalNext in class CachedRowSetImpl
Returns:
true if over the valid row in the rowset; false if over the last row
Throws:
java.sql.SQLException - if an error occurs

internalPrevious

protected boolean internalPrevious()
                            throws java.sql.SQLException
Over-riding internalPrevious() implementation. This method applies the filter on the RowSet each time the cursor is moved backward or manipulated. It moves the cursor to the previous row according to the set predicate and returns true if the cursor is still within the rowset or false if the cursor position is over the last row

Overrides:
internalPrevious in class CachedRowSetImpl
Returns:
true if over the valid row in the rowset; false if over the last row
Throws:
java.sql.SQLException - if an error occurs

internalFirst

protected boolean internalFirst()
                         throws java.sql.SQLException
Over-riding internalFirst() implementation. This method applies the filter on the RowSet each time the cursor is moved to first row. It moves the cursor to the first row according to the set predicate and returns true if the cursor is still within the rowset or false if the cursor position is over the last row

Overrides:
internalFirst in class CachedRowSetImpl
Returns:
true if over the valid row in the rowset; false if over the last row
Throws:
java.sql.SQLException - if an error occurs

internalLast

protected boolean internalLast()
                        throws java.sql.SQLException
Over-riding internalLast() implementation. This method applies the filter on the RowSet each time the cursor is moved to last row. It moves the cursor to the last row according to the set predicate and returns true if the cursor is still within the rowset or false if the cursor position is over the last row

Overrides:
internalLast in class CachedRowSetImpl
Returns:
true if over the valid row in the rowset; false if over the last row
Throws:
java.sql.SQLException - if an error occurs

relative

public boolean relative(int rows)
                 throws java.sql.SQLException
Moves the cursor the specified number of rows from the current position, with a positive number moving it forward and a negative number moving it backward.

If the number is positive, the cursor moves the specified number of rows toward the end of the rowset, starting at the current row. For example, the following command, in which crs is a CachedRowSetImpl object with 100 rows, moves the cursor forward four rows from the current row. If the current row is 50, the cursor would move to row 54.



    crs.relative(4);

  

If the number is negative, the cursor moves back toward the beginning the specified number of rows, starting at the current row. For example, calling the method absolute(-1) positions the cursor on the last row, absolute(-2) moves it on the next-to-last row, and so on. If the CachedRowSetImpl object crs has five rows, the following command moves the cursor to the fourth-to-last row, which in the case of a rowset with five rows, is also the second row from the beginning.



    crs.absolute(-4);

  
If the number specified is larger than the number of rows, the cursor will move to the position after the last row. If the number specified would move the cursor one or more rows before the first row, the cursor moves to the position before the first row. In both cases, this method throws an SQLException.

Note: Calling absolute(1) is the same as calling the method first(). Calling absolute(-1) is the same as calling last(). Calling relative(0) is valid, but it does not change the cursor position.

Specified by:
relative in interface java.sql.ResultSet
Overrides:
relative in class CachedRowSetImpl
Parameters:
rows - an int indicating the number of rows to move the cursor, starting at the current row; a positive number moves the cursor forward; a negative number moves the cursor backward; must not move the cursor past the valid rows
Returns:
true if the cursor is on a row in this CachedRowSetImpl object; false otherwise
Throws:
java.sql.SQLException - if the rowset is type ResultSet.TYPE_FORWARD_ONLY

absolute

public boolean absolute(int rows)
                 throws java.sql.SQLException
Moves this CachedRowSetImpl object's cursor to the row number specified.

If the number is positive, the cursor moves to an absolute row with respect to the beginning of the rowset. The first row is row 1, the second is row 2, and so on. For example, the following command, in which crs is a CachedRowSetImpl object, moves the cursor to the fourth row, starting from the beginning of the rowset.



    crs.absolute(4);

  

If the number is negative, the cursor moves to an absolute row position with respect to the end of the rowset. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) moves it on the next-to-last row, and so on. If the CachedRowSetImpl object crs has five rows, the following command moves the cursor to the fourth-to-last row, which in the case of a rowset with five rows, is also the second row, counting from the beginning.



    crs.absolute(-4);

  
If the number specified is larger than the number of rows, the cursor will move to the position after the last row. If the number specified would move the cursor one or more rows before the first row, the cursor moves to the position before the first row.

Note: Calling absolute(1) is the same as calling the method first(). Calling absolute(-1) is the same as calling last().

Specified by:
absolute in interface java.sql.ResultSet
Overrides:
absolute in class CachedRowSetImpl
Parameters:
rows - a positive number to indicate the row, starting row numbering from the first row, which is 1; a negative number to indicate the row, starting row numbering from the last row, which is -1; it must not be 0
Returns:
true if the cursor is on the rowset; false otherwise
Throws:
java.sql.SQLException - if the given cursor position is 0 or the type of this rowset is ResultSet.TYPE_FORWARD_ONLY

moveToInsertRow

public void moveToInsertRow()
                     throws java.sql.SQLException
Moves the cursor for this CachedRowSetImpl object to the insert row. The current row in the rowset is remembered while the cursor is 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 appropriate updateXXX methods to assign a value to each column in the row. A complete row must be constructed; that is, every column that is not nullable must be assigned a value. In order for the new row to become part of this rowset, the method insertRow must be called before the cursor is moved back to the rowset.

Only certain methods may be invoked while the cursor is on the insert row; many methods throw an exception if they are called while the cursor is there. In addition to the updateXXX and insertRow methods, only the getXXX methods may be called when the cursor is on the insert row. A getXXX method should be called on a column only after an updateXXX method has been called on that column; otherwise, the value returned is undetermined.

Specified by:
moveToInsertRow in interface java.sql.ResultSet
Overrides:
moveToInsertRow in class CachedRowSetImpl
Throws:
java.sql.SQLException - if this CachedRowSetImpl object is ResultSet.CONCUR_READ_ONLY

updateInt

public void updateInt(int columnIndex,
                      int x)
               throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given int value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateInt in interface java.sql.ResultSet
Overrides:
updateInt in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateInt

public void updateInt(java.lang.String columnName,
                      int x)
               throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given int value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateInt in interface java.sql.ResultSet
Overrides:
updateInt in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBoolean

public void updateBoolean(int columnIndex,
                          boolean x)
                   throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given boolean value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBoolean in interface java.sql.ResultSet
Overrides:
updateBoolean in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBoolean

public void updateBoolean(java.lang.String columnName,
                          boolean x)
                   throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given boolean value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBoolean in interface java.sql.ResultSet
Overrides:
updateBoolean in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateByte

public void updateByte(int columnIndex,
                       byte x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateByte in interface java.sql.ResultSet
Overrides:
updateByte in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateByte

public void updateByte(java.lang.String columnName,
                       byte x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateByte in interface java.sql.ResultSet
Overrides:
updateByte in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateShort

public void updateShort(int columnIndex,
                        short x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given short value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateShort in interface java.sql.ResultSet
Overrides:
updateShort in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateShort

public void updateShort(java.lang.String columnName,
                        short x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given short value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateShort in interface java.sql.ResultSet
Overrides:
updateShort in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateLong

public void updateLong(int columnIndex,
                       long x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given long value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateLong in interface java.sql.ResultSet
Overrides:
updateLong in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateLong

public void updateLong(java.lang.String columnName,
                       long x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given long value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateLong in interface java.sql.ResultSet
Overrides:
updateLong in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateFloat

public void updateFloat(int columnIndex,
                        float x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given float value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateFloat in interface java.sql.ResultSet
Overrides:
updateFloat in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateFloat

public void updateFloat(java.lang.String columnName,
                        float x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given float value.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateFloat in interface java.sql.ResultSet
Overrides:
updateFloat in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateDouble

public void updateDouble(int columnIndex,
                         double x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given double value. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateDouble in interface java.sql.ResultSet
Overrides:
updateDouble in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateDouble

public void updateDouble(java.lang.String columnName,
                         double x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given double value. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateDouble in interface java.sql.ResultSet
Overrides:
updateDouble in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBigDecimal

public void updateBigDecimal(int columnIndex,
                             java.math.BigDecimal x)
                      throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.math.BigDecimal object.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBigDecimal in interface java.sql.ResultSet
Overrides:
updateBigDecimal in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBigDecimal

public void updateBigDecimal(java.lang.String columnName,
                             java.math.BigDecimal x)
                      throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.math.BigDecimal object.

This method updates a column value in the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBigDecimal in interface java.sql.ResultSet
Overrides:
updateBigDecimal in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateString

public void updateString(int columnIndex,
                         java.lang.String x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given String object.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to mark the row as updated. If the cursor is on the insert row, the method insertRow() must be called to insert the new row into this rowset and mark it as inserted. Both of these methods must be called before the cursor moves to another row.

The method acceptChanges must be called if the updated values are to be written back to the underlying database.

Specified by:
updateString in interface java.sql.ResultSet
Overrides:
updateString in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateString

public void updateString(java.lang.String columnName,
                         java.lang.String x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given String object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateString in interface java.sql.ResultSet
Overrides:
updateString in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBytes

public void updateBytes(int columnIndex,
                        byte[] x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte array. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBytes in interface java.sql.ResultSet
Overrides:
updateBytes in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateBytes

public void updateBytes(java.lang.String columnName,
                        byte[] x)
                 throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given byte array. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBytes in interface java.sql.ResultSet
Overrides:
updateBytes in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateDate

public void updateDate(int columnIndex,
                       java.sql.Date x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateDate in interface java.sql.ResultSet
Overrides:
updateDate in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL DATE or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateDate

public void updateDate(java.lang.String columnName,
                       java.sql.Date x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateDate in interface java.sql.ResultSet
Overrides:
updateDate in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL DATE or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateTime

public void updateTime(int columnIndex,
                       java.sql.Time x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateTime in interface java.sql.ResultSet
Overrides:
updateTime in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL TIME or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateTime

public void updateTime(java.lang.String columnName,
                       java.sql.Time x)
                throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateTime in interface java.sql.ResultSet
Overrides:
updateTime in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL TIME or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateTimestamp

public void updateTimestamp(int columnIndex,
                            java.sql.Timestamp x)
                     throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Timestamp object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateTimestamp in interface java.sql.ResultSet
Overrides:
updateTimestamp in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL DATE, TIME, or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateTimestamp

public void updateTimestamp(java.lang.String columnName,
                            java.sql.Timestamp x)
                     throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Timestamp object. This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateTimestamp in interface java.sql.ResultSet
Overrides:
updateTimestamp in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if the given column index is out of bounds or the cursor is not on one of this rowset's rows or its insert row
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the type of the designated column is not an SQL DATE, TIME, or TIMESTAMP, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateAsciiStream

public void updateAsciiStream(int columnIndex,
                              java.io.InputStream x,
                              int length)
                       throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given ASCII stream value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateAsciiStream in interface java.sql.ResultSet
Overrides:
updateAsciiStream in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
length - the number of one-byte ASCII characters in the stream
Throws:
java.sql.SQLException - if this method is invoked

updateAsciiStream

public void updateAsciiStream(java.lang.String columnName,
                              java.io.InputStream x,
                              int length)
                       throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given ASCII stream value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateAsciiStream in interface java.sql.ResultSet
Overrides:
updateAsciiStream in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
length - the number of one-byte ASCII characters in the stream
Throws:
java.sql.SQLException

updateCahracterStream

public void updateCahracterStream(int columnIndex,
                                  java.io.Reader x,
                                  int length)
                           throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.Reader object.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value; must be a java.io.Reader containing BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, or LONGVARCHAR data
length - the length of the stream in characters
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the data in the stream is not a binary or character type, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateCharacterStream

public void updateCharacterStream(java.lang.String columnName,
                                  java.io.Reader reader,
                                  int length)
                           throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.Reader object.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateCharacterStream in interface java.sql.ResultSet
Overrides:
updateCharacterStream in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
reader - the new column value; must be a java.io.Reader containing BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, or LONGVARCHAR data
length - the length of the stream in characters
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the data in the stream is not a binary or character type, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateBinaryStream

public void updateBinaryStream(int columnIndex,
                               java.io.InputStream x,
                               int length)
                        throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.InputStream object.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBinaryStream in interface java.sql.ResultSet
Overrides:
updateBinaryStream in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value; must be a java.io.InputStream containing BINARY, VARBINARY, or LONGVARBINARY data
length - the length of the stream in bytes
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the data in the stream is not binary, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateBinaryStream

public void updateBinaryStream(java.lang.String columnName,
                               java.io.InputStream x,
                               int length)
                        throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given java.io.InputStream object.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateBinaryStream in interface java.sql.ResultSet
Overrides:
updateBinaryStream in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value; must be a java.io.InputStream containing BINARY, VARBINARY, or LONGVARBINARY data
length - the length of the stream in bytes
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, (3) the data in the stream is not binary, or (4) this rowset is ResultSet.CONCUR_READ_ONLY

updateObject

public void updateObject(int columnIndex,
                         java.lang.Object x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateObject in interface java.sql.ResultSet
Overrides:
updateObject in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateObject

public void updateObject(java.lang.String columnName,
                         java.lang.Object x)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateObject in interface java.sql.ResultSet
Overrides:
updateObject in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateObject

public void updateObject(int columnIndex,
                         java.lang.Object x,
                         int scale)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value. The scale parameter indicates the number of digits to the right of the decimal point and is ignored if the new column value is not a type that will be mapped to an SQL DECIMAL or NUMERIC value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateObject in interface java.sql.ResultSet
Overrides:
updateObject in class CachedRowSetImpl
Parameters:
columnIndex - the first column is 1, the second is 2, and so on; must be 1 or larger and equal to or less than the number of columns in this rowset
x - the new column value
scale - the number of digits to the right of the decimal point (for DECIMAL and NUMERIC types only)
Throws:
java.sql.SQLException - if (1) the given column index is out of bounds, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

updateObject

public void updateObject(java.lang.String columnName,
                         java.lang.Object x,
                         int scale)
                  throws java.sql.SQLException
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Object value. The scale parameter indicates the number of digits to the right of the decimal point and is ignored if the new column value is not a type that will be mapped to an SQL DECIMAL or NUMERIC value.

This method updates a column value in either the current row or the insert row of this rowset, but it does not update the database. If the cursor is on a row in the rowset, the method CachedRowSetImpl.updateRow() must be called to update the database. If the cursor is on the insert row, the method insertRow() must be called, which will insert the new row into both this rowset and the database. Both of these methods must be called before the cursor moves to another row.

Specified by:
updateObject in interface java.sql.ResultSet
Overrides:
updateObject in class CachedRowSetImpl
Parameters:
columnName - a String object that must match the SQL name of a column in this rowset, ignoring case
x - the new column value
scale - the number of digits to the right of the decimal point (for DECIMAL and NUMERIC types only)
Throws:
java.sql.SQLException - if (1) the given column name does not match the name of a column in this rowset, (2) the cursor is not on one of this rowset's rows or its insert row, or (3) this rowset is ResultSet.CONCUR_READ_ONLY

insertRow

public void insertRow()
               throws java.sql.SQLException
Inserts the contents of this CachedRowSetImpl object's insert row into this rowset immediately following the current row. If the current row is the position after the last row or before the first row, the new row will be inserted at the end of the rowset. This method also notifies listeners registered with this rowset that the row has changed.

The cursor must be on the insert row when this method is called.

Specified by:
insertRow in interface java.sql.ResultSet
Overrides:
insertRow in class CachedRowSetImpl
Throws:
java.sql.SQLException - if (1) the cursor is not on the insert row, (2) one or more of the non-nullable columns in the insert row has not been given a value, or (3) this rowset is ResultSet.CONCUR_READ_ONLY