|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.rowset.internal.BaseRow
com.sun.rowset.internal.InsertRow
A class used internally to manage a CachedRowSet
object's
insert row. This class keeps track of the number of columns in the
insert row and which columns have had a value inserted. It provides
methods for retrieving a column value, setting a column value, and finding
out whether the insert row is complete.
Field Summary |
Fields inherited from class com.sun.rowset.internal.BaseRow |
origVals |
Constructor Summary | |
InsertRow(int numCols)
Creates an InsertRow object initialized with the
given number of columns, an array for keeping track of the
original values in this insert row, and a
BitSet object with the same number of bits as
there are columns. |
Method Summary | |
java.lang.Object |
getColumnObject(int idx)
Retrieves the value of the designated column in this InsertRow object. |
void |
initInsertRow()
Clears all the bits in the internal BitSet object
maintained by this InsertRow object. |
boolean |
isCompleteRow(javax.sql.RowSetMetaData RowSetMD)
Indicates whether this InsertRow object has a value
for every column that cannot be null. |
protected void |
markColInserted(int col)
Sets the bit in this InsertRow object's internal
BitSet object that corresponds to the specified column
in this InsertRow object. |
void |
setColumnObject(int idx,
java.lang.Object val)
Sets the element in this InsertRow object's
internal array of original values that corresponds to the
designated column with the given value. |
Methods inherited from class com.sun.rowset.internal.BaseRow |
getOrigRow |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InsertRow(int numCols)
InsertRow
object initialized with the
given number of columns, an array for keeping track of the
original values in this insert row, and a
BitSet
object with the same number of bits as
there are columns.
numCols
- an int
indicating the number of columns
in this InsertRow
objectMethod Detail |
protected void markColInserted(int col)
InsertRow
object's internal
BitSet
object that corresponds to the specified column
in this InsertRow
object. Setting a bit indicates
that a value has been set.
col
- the number of the column to be marked as inserted;
the first column is 1
public boolean isCompleteRow(javax.sql.RowSetMetaData RowSetMD) throws java.sql.SQLException
InsertRow
object has a value
for every column that cannot be null.
RowSetMD
- the RowSetMetaData
object for the
CachedRowSet
object that maintains this
InsertRow
object
true
if this InsertRow
object is
complete; false
otherwise
java.sql.SQLException
- if there is an error accessing datapublic void initInsertRow()
BitSet
object
maintained by this InsertRow
object. Clearing all the bits
indicates that none of the columns have had a value inserted.
public java.lang.Object getColumnObject(int idx) throws java.sql.SQLException
InsertRow
object. If no value has been inserted
into the designated column, this method throws an
SQLException
.
getColumnObject
in class BaseRow
idx
- the column number of the value to be retrieved;
the first column is 1
Object
value at the given index into this
row's array of original values
java.sql.SQLException
- if no value has been inserted into
the designated columnpublic void setColumnObject(int idx, java.lang.Object val)
InsertRow
object's
internal array of original values that corresponds to the
designated column with the given value. If the third
argument is true
,
which means that the cursor is on the insert row, this
InsertRow
object's internal BitSet
object
is set so that the bit corresponding to the column being set is
turned on.
setColumnObject
in class BaseRow
val
- the value to be setidx
- the index of the element to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |