public abstract class RowData
extends java.lang.Object
implements java.io.Serializable
The RowData object maintains a position in the list pointing to its current row of data. The initial position is before the first row in the list. Row indexes are numbered starting with 0.
The number, types, and properties of the list's columns are provided by the RowMetaData object returned by the getMetaData method.
Individual data objects in the current row can have properties, or a list of objects, that can be associated with the data. Properties can be set with the setObjectProperties method.
RowData objects generate the following events:
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
rowProperties_ |
protected java.util.Vector |
rows_ |
Constructor and Description |
---|
RowData()
Constructs a default RowData object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int rowIndex)
Sets the position to the specified rowIndex.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener.
|
void |
afterLast()
Sets the position after the last row in the list.
|
void |
beforeFirst()
Sets the position before the first row in the list.
|
boolean |
first()
Sets the position to the first row in the list.
|
int |
getCurrentPosition()
Returns the current row position.
|
abstract RowMetaData |
getMetaData()
Returns the meta data.
|
java.lang.Object |
getObject(int columnIndex)
Returns the current row's column data specified at columnIndex.
|
java.util.Vector |
getObjectProperties(int columnIndex)
Returns the data object's property list at the specified columnIndex.
|
java.util.Vector[] |
getRowProperties()
Returns the current row's property list.
|
boolean |
isAfterLast()
Indicates whether the current position is after the last row in the list.
|
boolean |
isBeforeFirst()
Indicates whether the current position is before the first row in the list.
|
boolean |
isFirst()
Indicates whether the current position is the first row in the list.
|
boolean |
isLast()
Indicates whether the current position is the last row in the list.
|
boolean |
last()
Sets the position to the last row in the list.
|
int |
length()
Returns the number of rows in the list.
|
boolean |
next()
Sets the position to the next row in the list.
|
boolean |
previous()
Sets the position to the previous row in the list.
|
boolean |
relative(int numberOfRows)
Sets the position a relative numberOfRows based on the current position.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list.
|
void |
setObjectProperties(java.util.Vector properties,
int columnIndex)
Sets the data object's properties at the specified columnIndex.
|
protected java.util.Vector rows_
protected java.util.Vector rowProperties_
public boolean absolute(int rowIndex)
rowIndex
- The row index (0-based). The rowIndex must be zero or a positive integer which
is less than the number of rows.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void afterLast()
public void beforeFirst()
public boolean first()
public int getCurrentPosition()
public abstract RowMetaData getMetaData() throws RowDataException
RowDataException
- If a row data error occurs.public java.lang.Object getObject(int columnIndex) throws RowDataException
columnIndex
- The column index (0-based).RowDataException
- If a row data error occurs.public java.util.Vector getObjectProperties(int columnIndex)
columnIndex
- The column index (0-based).setObjectProperties(java.util.Vector, int)
public java.util.Vector[] getRowProperties()
public boolean isAfterLast()
public boolean isBeforeFirst()
public boolean isFirst()
public boolean isLast()
public boolean last()
public int length()
public boolean next()
public boolean previous()
public boolean relative(int numberOfRows)
numberOfRows
- The number of rows to move, either positive or negative.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setObjectProperties(java.util.Vector properties, int columnIndex)
properties
- The properties.columnIndex
- The column index (0-based).getObjectProperties(int)