Package Summary  Overview Summary


com.sun.rowset
Class FilteredRowSetImpl

java.lang.Object
  extended by javax.sql.rowset.BaseRowSet
      extended by com.sun.rowset.CachedRowSetImpl
          extended by com.sun.rowset.WebRowSetImpl
              extended by com.sun.rowset.FilteredRowSetImpl


All Implemented Interfaces:
java.io.Serializable, java.lang.AutoCloseable, java.lang.Cloneable, ResultSet, Wrapper, RowSet, CachedRowSet, FilteredRowSet, Joinable, WebRowSet, RowSetInternal

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.

See Also:
Predicate, Serialized Form


Field Summary
 
Fields inherited from class com.sun.rowset.CachedRowSetImpl
resBundle
 
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
 booleanabsolute(int rows)
          Moves this CachedRowSetImpl object's cursor to the row number specified.
 PredicategetFilter()
          Retrieve the filter active for this FilteredRowSet
 voidinsertRow()
          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.
 voidmoveToInsertRow()
          Moves the cursor for this CachedRowSetImpl object to the insert row.
 booleanrelative(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.
 voidsetFilter(Predicate p)
          Apply the predicate for this filter
 voidupdateAsciiStream(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.
 voidupdateAsciiStream(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.
 voidupdateBigDecimal(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.
 voidupdateBigDecimal(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.
 voidupdateBinaryStream(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.
 voidupdateBinaryStream(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.
 voidupdateBoolean(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.
 voidupdateBoolean(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.
 voidupdateByte(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.
 voidupdateByte(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.
 voidupdateBytes(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.
 voidupdateBytes(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.
 voidupdateCharacterStream(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.
 voidupdateCharacterStream(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.
 voidupdateDate(int columnIndex, Date x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object.
 voidupdateDate(java.lang.String columnName, Date x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Date object.
 voidupdateDouble(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.
 voidupdateDouble(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.
 voidupdateFloat(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.
 voidupdateFloat(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.
 voidupdateInt(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.
 voidupdateInt(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.
 voidupdateLong(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.
 voidupdateLong(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.
 voidupdateObject(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.
 voidupdateObject(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.
 voidupdateObject(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.
 voidupdateObject(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.
 voidupdateShort(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.
 voidupdateShort(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.
 voidupdateString(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.
 voidupdateString(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.
 voidupdateTime(int columnIndex, Time x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object.
 voidupdateTime(java.lang.String columnName, Time x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Time object.
 voidupdateTimestamp(int columnIndex, Timestamp x)
          Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given Timestamp object.
 voidupdateTimestamp(java.lang.String columnName, 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, getHoldability, getInt, getInt, getKeyColumns, getLong, getLong, getMatchColumnIndexes, getMatchColumnNames, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getOriginal, getOriginalRow, getPageSize, getRef, getRef, getRow, getRowId, getRowId, getRowSetWarnings, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getSyncProvider, getTableName, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, next, nextPage, populate, populate, previous, previousPage, refreshRow, release, removeCurrentRow, restoreOriginal, rollback, rollback, rowDeleted, rowInserted, rowSetPopulated, rowUpdated, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setCommand, setDate, setDate, setDouble, setFloat, setInt, setKeyColumns, setLong, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, setMetaData, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setObject, setObject, setObject, setOriginal, setOriginalRow, setPageSize, setRowId, setRowId, setRowInserted, setShort, setSQLXML, setSQLXML, setString, setSyncProvider, setTableName, setTime, setTime, setTimestamp, setTimestamp, setURL, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateSQLXML, updateSQLXML, 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, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, 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, setUnicodeStream, 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, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDate, setDate, setDouble, setDouble, setEscapeProcessing, setFloat, setFloat, setInt, setInt, setLong, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setRowId, setRowId, setShort, setShort, setSQLXML, setSQLXML, setString, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setURL, 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, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, next, previous, refreshRow, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateSQLXML, updateSQLXML, wasNull
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 
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 SQLException
Construct a FilteredRowSet

Throws:
SQLException


FilteredRowSetImpl

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

Parameters:
env - a Hashtable containing a desired synchconizatation provider name-value pair.
Throws:
SQLException

Method Detail

setFilter

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

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

getFilter

public PredicategetFilter()
Retrieve the filter active for this FilteredRowSet

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

internalNext

protected boolean internalNext()
                        throws 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:
SQLException - if an error occurs

internalPrevious

protected boolean internalPrevious()
                            throws 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:
SQLException - if an error occurs

internalFirst

protected boolean internalFirst()
                         throws 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:
SQLException - if an error occurs

internalLast

protected boolean internalLast()
                        throws 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:
SQLException - if an error occurs

relative

public boolean relative(int rows)
                 throws 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 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:
SQLException - if the rowset is type ResultSet.TYPE_FORWARD_ONLY

absolute

public boolean absolute(int rows)
                 throws 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 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:
SQLException - if the given cursor position is 0 or the type of this rowset is ResultSet.TYPE_FORWARD_ONLY

moveToInsertRow

public void moveToInsertRow()
                     throws 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 ResultSet
Overrides:
moveToInsertRow in class CachedRowSetImpl
Throws:
SQLException - if this CachedRowSetImpl object is ResultSet.CONCUR_READ_ONLY

updateInt

public void updateInt(int columnIndex,
                      int x)
               throws 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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,
                       Date x)
                throws 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 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:
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,
                       Date x)
                throws 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 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:
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,
                       Time x)
                throws 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 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:
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,
                       Time x)
                throws 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 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:
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,
                            Timestamp x)
                     throws 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 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:
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,
                            Timestamp x)
                     throws 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 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:
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
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 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 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:
SQLException - if this method is invoked

updateAsciiStream

public void updateAsciiStream(java.lang.String columnName,
                              java.io.InputStream x,
                              int length)
                       throws 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 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:
SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
SQLFeatureNotSupportedException - if the JDBC driver does not support this method

updateCharacterStream

public void updateCharacterStream(int columnIndex,
                                  java.io.Reader x,
                                  int length)
                           throws 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 ResultSet
Overrides:
updateCharacterStream 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.Reader containing BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, or LONGVARCHAR data
length - the length of the stream in characters
Throws:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 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:
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 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 ResultSet
Overrides:
insertRow in class CachedRowSetImpl
Throws:
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


Java is a trademark or registered trademark of Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A All Rights Reserved.