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:
- PropertyChangeEvent
- VetoableChangeEvent
-
RowData()
- Constructs a default RowData object.
-
absolute(int)
- Sets the position to the specified rowIndex.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds the VetoableChangeListener.
-
afterLast()
- Sets the position after the last row in the list.
-
beforeFirst()
- Sets the position before the first row in the list.
-
first()
- Sets the position to the first row in the list.
-
getCurrentPosition()
- Returns the current row position.
-
getMetaData()
- Returns the meta data.
-
getObject(int)
- Returns the current row's column data specified at columnIndex.
-
getObjectProperties(int)
- Returns the data object's property list at the specified columnIndex.
-
getRowProperties()
- Returns the current row's property list.
-
isAfterLast()
- Indicates whether the current position is after the last row in the list.
-
isBeforeFirst()
- Indicates whether the current position is before the first row in the list.
-
isFirst()
- Indicates whether the current position is the first row in the list.
-
isLast()
- Indicates whether the current position is the last row in the list.
-
last()
- Sets the position to the last row in the list.
-
length()
- Returns the number of rows in the list.
-
next()
- Sets the position to the next row in the list.
-
previous()
- Sets the position to the previous row in the list.
-
relative(int)
- Sets the position a relative numberOfRows based on the current position.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes the PropertyChangeListener from the internal list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes the VetoableChangeListener from the internal list.
-
setObjectProperties(Vector, int)
-
Sets the data object's properties at the specified columnIndex.
RowData
public RowData()
- Constructs a default RowData object.
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.
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
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
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.
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.
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.
getCurrentPosition
public int getCurrentPosition()
- Returns the current row position.
- Returns:
- The row position (0-based).
getMetaData
public abstract RowMetaData getMetaData() throws RowDataException
- Returns the meta data.
- Returns:
- The meta data.
- Throws: RowDataException
- If a row data error occurs.
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.
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
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.
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.
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.
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.
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.
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.
length
public int length()
- Returns the number of rows in the list.
- Returns:
- The number of rows.
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.
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.
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.
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
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
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