|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sql.rowset.BaseRowSet com.sun.rowset.CachedRowSetImpl com.sun.rowset.WebRowSetImpl com.sun.rowset.FilteredRowSetImpl
The standard implementation of the FilteredRowSet
interface. See the interface
defintion for full behaviour and implementation requirements.
Predicate
,
Serialized FormField Summary |
Fields inherited from class javax.sql.rowset.BaseRowSet |
ASCII_STREAM_PARAM, asciiStream, BINARY_STREAM_PARAM, binaryStream, charStream, UNICODE_STREAM_PARAM, unicodeStream |
Fields inherited from interface javax.sql.rowset.WebRowSet |
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_ID |
Fields inherited from interface javax.sql.rowset.CachedRowSet |
COMMIT_ON_ACCEPT_CHANGES |
Fields inherited from interface java.sql.ResultSet |
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
Constructor Summary | |
FilteredRowSetImpl()
Construct a FilteredRowSet |
|
FilteredRowSetImpl(java.util.Hashtable env)
Construct a FilteredRowSet with a specified synchronization
provider. |
Method Summary | |
boolean |
absolute(int rows)
Moves this CachedRowSetImpl object's cursor to the row number
specified. |
Predicate |
getFilter()
Retrieve the filter active for this FilteredRowSet |
void |
insertRow()
Inserts the contents of this CachedRowSetImpl object's insert
row into this rowset immediately following the current row. |
protected boolean |
internalFirst()
Over-riding internalFirst() implementation. |
protected boolean |
internalLast()
Over-riding internalLast() implementation. |
protected boolean |
internalNext()
Over-riding internalNext() implementation. |
protected boolean |
internalPrevious()
Over-riding internalPrevious() implementation. |
void |
moveToInsertRow()
Moves the cursor for this CachedRowSetImpl object
to the insert row. |
boolean |
relative(int rows)
Moves the cursor the specified number of rows from the current position, with a positive number moving it forward and a negative number moving it backward. |
void |
setFilter(Predicate p)
Apply the predicate for this filter |
void |
updateAsciiStream(int columnIndex,
java.io.InputStream x,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
ASCII stream value. |
void |
updateAsciiStream(java.lang.String columnName,
java.io.InputStream x,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
ASCII stream value. |
void |
updateBigDecimal(int columnIndex,
java.math.BigDecimal x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.math.BigDecimal object. |
void |
updateBigDecimal(java.lang.String columnName,
java.math.BigDecimal x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.math.BigDecimal object. |
void |
updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.io.InputStream object. |
void |
updateBinaryStream(java.lang.String columnName,
java.io.InputStream x,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.io.InputStream object. |
void |
updateBoolean(int columnIndex,
boolean x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
boolean value. |
void |
updateBoolean(java.lang.String columnName,
boolean x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
boolean value. |
void |
updateByte(int columnIndex,
byte x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
byte value. |
void |
updateByte(java.lang.String columnName,
byte x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
byte value. |
void |
updateBytes(int columnIndex,
byte[] x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
byte array. |
void |
updateBytes(java.lang.String columnName,
byte[] x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
byte array. |
void |
updateCahracterStream(int columnIndex,
java.io.Reader x,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.io.Reader object. |
void |
updateCharacterStream(java.lang.String columnName,
java.io.Reader reader,
int length)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
java.io.Reader object. |
void |
updateDate(int columnIndex,
java.sql.Date x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Date object. |
void |
updateDate(java.lang.String columnName,
java.sql.Date x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Date object. |
void |
updateDouble(int columnIndex,
double x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
double value. |
void |
updateDouble(java.lang.String columnName,
double x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
double value. |
void |
updateFloat(int columnIndex,
float x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
float value. |
void |
updateFloat(java.lang.String columnName,
float x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
float value. |
void |
updateInt(int columnIndex,
int x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
int value. |
void |
updateInt(java.lang.String columnName,
int x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
int value. |
void |
updateLong(int columnIndex,
long x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
long value. |
void |
updateLong(java.lang.String columnName,
long x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
long value. |
void |
updateObject(int columnIndex,
java.lang.Object x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Object value. |
void |
updateObject(int columnIndex,
java.lang.Object x,
int scale)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object x,
int scale)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Object value. |
void |
updateShort(int columnIndex,
short x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
short value. |
void |
updateShort(java.lang.String columnName,
short x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
short value. |
void |
updateString(int columnIndex,
java.lang.String x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
String object. |
void |
updateString(java.lang.String columnName,
java.lang.String x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
String object. |
void |
updateTime(int columnIndex,
java.sql.Time x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Time object. |
void |
updateTime(java.lang.String columnName,
java.sql.Time x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Time object. |
void |
updateTimestamp(int columnIndex,
java.sql.Timestamp x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Timestamp object. |
void |
updateTimestamp(java.lang.String columnName,
java.sql.Timestamp x)
Sets the designated column in either the current row or the insert row of this CachedRowSetImpl object with the given
Timestamp object. |
Methods inherited from class com.sun.rowset.WebRowSetImpl |
readXml, readXml, writeXml, writeXml, writeXml, writeXml |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.rowset.WebRowSet |
readXml, readXml, writeXml, writeXml, writeXml, writeXml |
Methods inherited from interface javax.sql.rowset.CachedRowSet |
acceptChanges, acceptChanges, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, execute, getKeyColumns, getOriginal, getOriginalRow, getPageSize, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, nextPage, populate, populate, previousPage, release, restoreOriginal, rollback, rollback, rowSetPopulated, setKeyColumns, setMetaData, setOriginalRow, setPageSize, setShowDeleted, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate |
Methods inherited from interface javax.sql.RowSet |
addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setUsername |
Methods inherited from interface java.sql.ResultSet |
afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, next, previous, refreshRow, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateBlob, updateBlob, updateCharacterStream, updateClob, updateClob, updateNull, updateNull, updateRef, updateRef, updateRow, wasNull |
Methods inherited from interface javax.sql.rowset.Joinable |
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
Methods inherited from interface javax.sql.RowSetInternal |
getParams |
Constructor Detail |
public FilteredRowSetImpl() throws java.sql.SQLException
FilteredRowSet
public FilteredRowSetImpl(java.util.Hashtable env) throws java.sql.SQLException
FilteredRowSet
with a specified synchronization
provider.
env
- a Hashtable containing a desired synchconizatation provider
name-value pair.Method Detail |
public void setFilter(Predicate p) throws java.sql.SQLException
setFilter
in interface FilteredRowSet
p
- an implementation of the predicate interface
java.sql.SQLException
- if an error occurs when setting the
Predicate
objectpublic Predicate getFilter()
FilteredRowSet
getFilter
in interface FilteredRowSet
Predicate
object instanceprotected boolean internalNext() throws java.sql.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
java.sql.SQLException
- if an error occursprotected boolean internalPrevious() throws java.sql.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
java.sql.SQLException
- if an error occursprotected boolean internalFirst() throws java.sql.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
java.sql.SQLException
- if an error occursprotected boolean internalLast() throws java.sql.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
java.sql.SQLException
- if an error occurspublic boolean relative(int rows) throws java.sql.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 java.sql.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
java.sql.SQLException
- if the rowset is type ResultSet.TYPE_FORWARD_ONLY
public boolean absolute(int rows) throws java.sql.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 java.sql.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
java.sql.SQLException
- if the given cursor position is 0
or the
type of this rowset is ResultSet.TYPE_FORWARD_ONLY
public void moveToInsertRow() throws java.sql.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 java.sql.ResultSet
moveToInsertRow
in class CachedRowSetImpl
java.sql.SQLException
- if this CachedRowSetImpl
object is
ResultSet.CONCUR_READ_ONLY
public void updateInt(int columnIndex, int x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateInt(java.lang.String columnName, int x) throws java.sql.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 java.sql.ResultSet
updateInt
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateBoolean(int columnIndex, boolean x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.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 java.sql.ResultSet
updateBoolean
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateByte(int columnIndex, byte x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateByte(java.lang.String columnName, byte x) throws java.sql.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 java.sql.ResultSet
updateByte
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateShort(int columnIndex, short x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateShort(java.lang.String columnName, short x) throws java.sql.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 java.sql.ResultSet
updateShort
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateLong(int columnIndex, long x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateLong(java.lang.String columnName, long x) throws java.sql.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 java.sql.ResultSet
updateLong
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateFloat(int columnIndex, float x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateFloat(java.lang.String columnName, float x) throws java.sql.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 java.sql.ResultSet
updateFloat
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateDouble(int columnIndex, double x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateDouble(java.lang.String columnName, double x) throws java.sql.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 java.sql.ResultSet
updateDouble
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.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 java.sql.ResultSet
updateBigDecimal
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateString(int columnIndex, java.lang.String x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.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 java.sql.ResultSet
updateString
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateBytes(int columnIndex, byte[] x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.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 java.sql.ResultSet
updateBytes
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, (3) the type of the designated column is not
an SQL DATE
or TIMESTAMP
, or
(4) this rowset is ResultSet.CONCUR_READ_ONLY
public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.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 java.sql.ResultSet
updateDate
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, (3) the type
of the designated column is not an SQL DATE
or
TIMESTAMP
, or (4) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, (3) the type of the designated column is not
an SQL TIME
or TIMESTAMP
, or
(4) this rowset is ResultSet.CONCUR_READ_ONLY
public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.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 java.sql.ResultSet
updateTime
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, (3) the type
of the designated column is not an SQL TIME
or
TIMESTAMP
, or (4) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, (3) the type of the designated column is not
an SQL DATE
, TIME
, or
TIMESTAMP
, or (4) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.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 java.sql.ResultSet
updateTimestamp
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if the given column index is out of bounds or
the cursor is not on one of this rowset's rows or its
insert row
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, (3) the type
of the designated column is not an SQL DATE
,
TIME
, or TIMESTAMP
, or (4) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.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 java.sql.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 rowsetx
- the new column valuelength
- the number of one-byte ASCII characters in the stream
java.sql.SQLException
- if this method is invokedpublic void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.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 java.sql.ResultSet
updateAsciiStream
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column valuelength
- the number of one-byte ASCII characters in the stream
java.sql.SQLException
public void updateCahracterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.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.
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 rowsetx
- the new column value; must be a java.io.Reader
containing BINARY
, VARBINARY
,
LONGVARBINARY
, CHAR
, VARCHAR
,
or LONGVARCHAR
datalength
- the length of the stream in characters
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, (3) the data in the stream is not a binary or
character type, or (4) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws java.sql.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 java.sql.ResultSet
updateCharacterStream
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casereader
- the new column value; must be a
java.io.Reader
containing BINARY
,
VARBINARY
, LONGVARBINARY
, CHAR
,
VARCHAR
, or LONGVARCHAR
datalength
- the length of the stream in characters
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, (3) the data
in the stream is not a binary or character type, or (4) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.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 java.sql.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 rowsetx
- the new column value; must be a java.io.InputStream
containing BINARY
, VARBINARY
, or
LONGVARBINARY
datalength
- the length of the stream in bytes
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, (3) the data in the stream is not binary, or
(4) this rowset is ResultSet.CONCUR_READ_ONLY
public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.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 java.sql.ResultSet
updateBinaryStream
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value; must be a java.io.InputStream
containing BINARY
, VARBINARY
, or
LONGVARBINARY
datalength
- the length of the stream in bytes
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, (3) the data
in the stream is not binary, or (4) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.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 java.sql.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 rowsetx
- the new column value
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.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 java.sql.ResultSet
updateObject
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column value
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.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 java.sql.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 rowsetx
- the new column valuescale
- the number of digits to the right of the decimal point (for
DECIMAL
and NUMERIC
types only)
java.sql.SQLException
- if (1) the given column index is out of bounds,
(2) the cursor is not on one of this rowset's rows or its
insert row, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.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 java.sql.ResultSet
updateObject
in class CachedRowSetImpl
columnName
- a String
object that must match the
SQL name of a column in this rowset, ignoring casex
- the new column valuescale
- the number of digits to the right of the decimal point (for
DECIMAL
and NUMERIC
types only)
java.sql.SQLException
- if (1) the given column name does not match the
name of a column in this rowset, (2) the cursor is not on
one of this rowset's rows or its insert row, or (3) this
rowset is ResultSet.CONCUR_READ_ONLY
public void insertRow() throws java.sql.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 java.sql.ResultSet
insertRow
in class CachedRowSetImpl
java.sql.SQLException
- if (1) the cursor is not on the insert row,
(2) one or more of the non-nullable columns in the insert
row has not been given a value, or (3) this rowset is
ResultSet.CONCUR_READ_ONLY
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |