Package Summary Overview Summary |
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.sql.rowset.BaseRowSet
com.sun.rowset.CachedRowSetImpl
com.sun.rowset.WebRowSetImpl
com.sun.rowset.FilteredRowSetImpl
public class FilteredRowSetImpl
The standard implementation of the FilteredRowSet
interface. See the interface defintion for full behaviour and implementation requirements.
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 | |
---|---|
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 | updateCharacterStream(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, 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, 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, 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, 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, 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, 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 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 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 |
---|
public FilteredRowSetImpl() throws SQLException
FilteredRowSet
SQLException
public FilteredRowSetImpl(java.util.Hashtable env) throws SQLException
FilteredRowSet
with a specified synchronization provider.
env
- a Hashtable containing a desired synchconizatation provider name-value pair. SQLException
Method Detail |
---|
public void setFilter(Predicate p) throws SQLException
setFilter
in interface FilteredRowSet
p
- an implementation of the predicate interface SQLException
- if an error occurs when setting the Predicate
object public PredicategetFilter()
FilteredRowSet
getFilter
in interface FilteredRowSet
Predicate
object instance protected boolean internalNext() throws SQLException
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
internalNext
in class CachedRowSetImpl
SQLException
- if an error occurs protected boolean internalPrevious() throws SQLException
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
internalPrevious
in class CachedRowSetImpl
SQLException
- if an error occurs protected boolean internalFirst() throws SQLException
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
internalFirst
in class CachedRowSetImpl
SQLException
- if an error occurs protected boolean internalLast() throws SQLException
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
internalLast
in class CachedRowSetImpl
SQLException
- if an error occurs public boolean relative(int rows) throws SQLException
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.
relative
in interface ResultSet
relative
in class CachedRowSetImpl
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 true
if the cursor is on a row in this CachedRowSetImpl
object; false
otherwise SQLException
- if the rowset is type ResultSet.TYPE_FORWARD_ONLY
public boolean absolute(int rows) throws SQLException
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()
.
absolute
in interface ResultSet
absolute
in class CachedRowSetImpl
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
true
if the cursor is on the rowset; false
otherwise SQLException
- if the given cursor position is 0
or the type of this rowset is ResultSet.TYPE_FORWARD_ONLY
public void moveToInsertRow() throws SQLException
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.
moveToInsertRow
in interface ResultSet
moveToInsertRow
in class CachedRowSetImpl
SQLException
- if this CachedRowSetImpl
object is ResultSet.CONCUR_READ_ONLY
public void updateInt(int columnIndex, int x) throws SQLException
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.
updateInt
in interface ResultSet
updateInt
in class CachedRowSetImpl
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 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
public void updateInt(java.lang.String columnName, int x) throws SQLException
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.
updateInt
in interface ResultSet
updateInt
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateBoolean(int columnIndex, boolean x) throws SQLException
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.
updateBoolean
in interface ResultSet
updateBoolean
in class CachedRowSetImpl
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 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
public void updateBoolean(java.lang.String columnName, boolean x) throws SQLException
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.
updateBoolean
in interface ResultSet
updateBoolean
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateByte(int columnIndex, byte x) throws SQLException
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.
updateByte
in interface ResultSet
updateByte
in class CachedRowSetImpl
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 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
public void updateByte(java.lang.String columnName, byte x) throws SQLException
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.
updateByte
in interface ResultSet
updateByte
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateShort(int columnIndex, short x) throws SQLException
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.
updateShort
in interface ResultSet
updateShort
in class CachedRowSetImpl
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 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
public void updateShort(java.lang.String columnName, short x) throws SQLException
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.
updateShort
in interface ResultSet
updateShort
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateLong(int columnIndex, long x) throws SQLException
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.
updateLong
in interface ResultSet
updateLong
in class CachedRowSetImpl
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 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
public void updateLong(java.lang.String columnName, long x) throws SQLException
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.
updateLong
in interface ResultSet
updateLong
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateFloat(int columnIndex, float x) throws SQLException
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.
updateFloat
in interface ResultSet
updateFloat
in class CachedRowSetImpl
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 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
public void updateFloat(java.lang.String columnName, float x) throws SQLException
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.
updateFloat
in interface ResultSet
updateFloat
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateDouble(int columnIndex, double x) throws SQLException
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.
updateDouble
in interface ResultSet
updateDouble
in class CachedRowSetImpl
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 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
public void updateDouble(java.lang.String columnName, double x) throws SQLException
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.
updateDouble
in interface ResultSet
updateDouble
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws SQLException
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.
updateBigDecimal
in interface ResultSet
updateBigDecimal
in class CachedRowSetImpl
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 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
public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws SQLException
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.
updateBigDecimal
in interface ResultSet
updateBigDecimal
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateString(int columnIndex, java.lang.String x) throws SQLException
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.
updateString
in interface ResultSet
updateString
in class CachedRowSetImpl
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 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
public void updateString(java.lang.String columnName, java.lang.String x) throws SQLException
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.
updateString
in interface ResultSet
updateString
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateBytes(int columnIndex, byte[] x) throws SQLException
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.
updateBytes
in interface ResultSet
updateBytes
in class CachedRowSetImpl
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 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
public void updateBytes(java.lang.String columnName, byte[] x) throws SQLException
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.
updateBytes
in interface ResultSet
updateBytes
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateDate(int columnIndex, Date x) throws SQLException
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.
updateDate
in interface ResultSet
updateDate
in class CachedRowSetImpl
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 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
public void updateDate(java.lang.String columnName, Date x) throws SQLException
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.
updateDate
in interface ResultSet
updateDate
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateTime(int columnIndex, Time x) throws SQLException
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.
updateTime
in interface ResultSet
updateTime
in class CachedRowSetImpl
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 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
public void updateTime(java.lang.String columnName, Time x) throws SQLException
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.
updateTime
in interface ResultSet
updateTime
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
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.
updateTimestamp
in interface ResultSet
updateTimestamp
in class CachedRowSetImpl
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 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
public void updateTimestamp(java.lang.String columnName, Timestamp x) throws SQLException
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.
updateTimestamp
in interface ResultSet
updateTimestamp
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException
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.
updateAsciiStream
in interface ResultSet
updateAsciiStream
in class CachedRowSetImpl
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 SQLException
- if this method is invoked public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws SQLException
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.
updateAsciiStream
in interface ResultSet
updateAsciiStream
in class CachedRowSetImpl
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 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 public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException
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.
updateCharacterStream
in interface ResultSet
updateCharacterStream
in class CachedRowSetImpl
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 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
public void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws SQLException
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.
updateCharacterStream
in interface ResultSet
updateCharacterStream
in class CachedRowSetImpl
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 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
public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException
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.
updateBinaryStream
in interface ResultSet
updateBinaryStream
in class CachedRowSetImpl
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 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
public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws SQLException
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.
updateBinaryStream
in interface ResultSet
updateBinaryStream
in class CachedRowSetImpl
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 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
public void updateObject(int columnIndex, java.lang.Object x) throws SQLException
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.
updateObject
in interface ResultSet
updateObject
in class CachedRowSetImpl
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 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
public void updateObject(java.lang.String columnName, java.lang.Object x) throws SQLException
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.
updateObject
in interface ResultSet
updateObject
in class CachedRowSetImpl
columnName
- a String
object that must match the SQL name of a column in this rowset, ignoring case x
- the new column value 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
public void updateObject(int columnIndex, java.lang.Object x, int scale) throws SQLException
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.
updateObject
in interface ResultSet
updateObject
in class CachedRowSetImpl
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) 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
public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws SQLException
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.
updateObject
in interface ResultSet
updateObject
in class CachedRowSetImpl
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) 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
public void insertRow() throws SQLException
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.
insertRow
in interface ResultSet
insertRow
in class CachedRowSetImpl
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
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |