APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.rowset.internal

public abstract Class BaseRow

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
com.sun.rowset.internal.InsertRow, com.sun.rowset.internal.Row
Imports
java.sql.*, java.io.*, java.util.Arrays

The abstract base class from which the classes Row The class BaseRow stores a row's original values as an array of Object values, which can be retrieved with the method getOrigRow. This class also provides methods for getting and setting individual values in the row.

A row's original values are the values it contained before it was last modified. For example, when the CachedRowSetmethod acceptChanges is called, it will reset a row's original values to be the row's current values. Then, when the row is modified, the values that were previously the current values will become the row's original values (the values the row had immediately before it was modified). If a row has not been modified, its original values are its initial values.

Subclasses of this class contain more specific details, such as the conditions under which an exception is thrown or the bounds for index parameters.

Field Summary

Modifier and TypeField and Description
protected Object[]
origVals

The array containing the original values for this BaseRow object.

private static final long
serialVersionUID

Specify the serialVersionUID

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Object

Returns:

the Object value at the given index into this row's array of original values
getColumnObject
(int
the index of the element to return
idx
)

Retrieves the array element at the given index, which is the original value of column number idx in this row.

public Object[]

Returns:

an array of Object values containing this row's original values
getOrigRow
()

Retrieves the values that this row contained immediately prior to its last modification.

public abstract void
setColumnObject(int
the index of the element to be set
idx
,
Object
the Object to which the element at index idx to be set
obj
)

Sets the element at the given index into this row's array of original values to the given value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

origValsback to summary
protected Object[] origVals

The array containing the original values for this BaseRow object.

Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Specify the serialVersionUID

Constructor Detail

BaseRowback to summary
public BaseRow()

Method Detail

getColumnObjectback to summary
public abstract Object getColumnObject(int idx) throws SQLException

Retrieves the array element at the given index, which is the original value of column number idx in this row.

Parameters
idx:int

the index of the element to return

Returns:Object

the Object value at the given index into this row's array of original values

Exceptions
SQLException:
if there is an error
getOrigRowback to summary
public Object[] getOrigRow()

Retrieves the values that this row contained immediately prior to its last modification.

Returns:Object[]

an array of Object values containing this row's original values

setColumnObjectback to summary
public abstract void setColumnObject(int idx, Object obj) throws SQLException

Sets the element at the given index into this row's array of original values to the given value. Implementations of the classes Row and determine what happens when the cursor is on the insert row and when it is on any other row.

Parameters
idx:int

the index of the element to be set

obj:Object

the Object to which the element at index idx to be set

Exceptions
SQLException:
if there is an error