All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.util.servlet.RowData

java.lang.Object
   |
   +----com.ibm.as400.util.servlet.RowData

public abstract class RowData
extends Object
implements Serializable
The RowData class defines a representation for describing and accessing a list of data.

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:


Constructor Index

 o RowData()
Constructs a default RowData object.

Method Index

 o absolute(int)
Sets the position to the specified rowIndex.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the VetoableChangeListener.
 o afterLast()
Sets the position after the last row in the list.
 o beforeFirst()
Sets the position before the first row in the list.
 o first()
Sets the position to the first row in the list.
 o getCurrentPosition()
Returns the current row position.
 o getMetaData()
Returns the meta data.
 o getObject(int)
Returns the current row's column data specified at columnIndex.
 o getObjectProperties(int)
Returns the data object's property list at the specified columnIndex.
 o getRowProperties()
Returns the current row's property list.
 o isAfterLast()
Indicates whether the current position is after the last row in the list.
 o isBeforeFirst()
Indicates whether the current position is before the first row in the list.
 o isFirst()
Indicates whether the current position is the first row in the list.
 o isLast()
Indicates whether the current position is the last row in the list.
 o last()
Sets the position to the last row in the list.
 o length()
Returns the number of rows in the list.
 o next()
Sets the position to the next row in the list.
 o previous()
Sets the position to the previous row in the list.
 o relative(int)
Sets the position a relative numberOfRows based on the current position.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the VetoableChangeListener from the internal list.
 o setObjectProperties(Vector, int)
Sets the data object's properties at the specified columnIndex.

Constructors

 o RowData
 public RowData()
Constructs a default RowData object.

Methods

 o absolute
 public boolean absolute(int rowIndex)
Sets the position to the specified rowIndex. Attempting to move beyond the first row will move to the position before the first row. Attempting to move beyond the last row will move to the position after the last row.

Parameters:
rowIndex - The row index (0-based). The rowIndex must be zero or a positive integer which is less than the number of rows.
Returns:
true if the requested position exists; false otherwise.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method is called each time the value of any bound property is changed.

Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds the VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method is called each time the value of any constrained property is changed.

Parameters:
listener - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o afterLast
 public void afterLast()
Sets the position after the last row in the list. This is a valid position after the end of the list.

 o beforeFirst
 public void beforeFirst()
Sets the position before the first row in the list. This is a valid position before the beginning of the list.

 o first
 public boolean first()
Sets the position to the first row in the list.

Returns:
true if the requested position exists; false if the list is empty.
 o getCurrentPosition
 public int getCurrentPosition()
Returns the current row position.

Returns:
The row position (0-based).
 o getMetaData
 public abstract RowMetaData getMetaData() throws RowDataException
Returns the meta data.

Returns:
The meta data.
Throws: RowDataException
If a row data error occurs.
 o getObject
 public Object getObject(int columnIndex) throws RowDataException
Returns the current row's column data specified at columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column object.
Throws: RowDataException
If a row data error occurs.
 o getObjectProperties
 public Vector getObjectProperties(int columnIndex)
Returns the data object's property list at the specified columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The property list for the column data object.
See Also:
setObjectProperties
 o getRowProperties
 public Vector[] getRowProperties()
Returns the current row's property list. Each Vector in the properties list corresponds to the appropriate data object's list of properties.

Returns:
The property lists for each data object in the row.
 o isAfterLast
 public boolean isAfterLast()
Indicates whether the current position is after the last row in the list. This is a valid position after the end of the list.

Returns:
true if the position is after the last row; false otherwise.
 o isBeforeFirst
 public boolean isBeforeFirst()
Indicates whether the current position is before the first row in the list. This is a valid position before the beginning of the list.

Returns:
true if the position is before the first row and the list is not empty; false otherwise.
 o isFirst
 public boolean isFirst()
Indicates whether the current position is the first row in the list.

Returns:
true if the position is the first row; false otherwise.
 o isLast
 public boolean isLast()
Indicates whether the current position is the last row in the list.

Returns:
true if the position is the last row; false otherwise.
 o last
 public boolean last()
Sets the position to the last row in the list.

Returns:
true if the requested position exists; false if the list is empty.
 o length
 public int length()
Returns the number of rows in the list.

Returns:
The number of rows.
 o next
 public boolean next()
Sets the position to the next row in the list. The list is initially positioned before its first row. The first call to next makes the first row the current row, the second call makes the second row the current row, etc. Moving beyond last row in the list will result in a position after the last row.

Returns:
true if the requested position exists in the list; false if there are no more rows.
 o previous
 public boolean previous()
Sets the position to the previous row in the list. Moving beyond the first row in the list will result in a position before the first row.

Returns:
true if the requested position exists in the list; false otherwise.
 o relative
 public boolean relative(int numberOfRows)
Sets the position a relative numberOfRows based on the current position. Moving beyond the first/last row in the list will result in a position before/after the first/last row.

Parameters:
numberOfRows - The number of rows to move, either positive or negative.
Returns:
true if the requested position exists; false otherwise.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
listener - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setObjectProperties
 public void setObjectProperties(Vector properties,
                                 int columnIndex)
Sets the data object's properties at the specified columnIndex. Object properties are user defined objects that can be associated with the data in the row.

Parameters:
properties - The properties.
columnIndex - The column index (0-based).
See Also:
getObjectProperties

All Packages  Class Hierarchy  This Package  Previous  Next  Index