public class DataRowCollection
extends java.lang.Object
implements java.lang.Iterable
DataTable
.Modifier and Type | Method and Description |
---|---|
void |
add(DataRow row)
Adds the specified
DataRow to the DataRowCollection object. |
void |
add(java.lang.Object... values)
Creates a row using specified values and adds it to the
DataRowCollection . |
void |
clear()
Clears the collection of all rows.
|
DataRow |
find(java.lang.Object[] keys)
Gets the row that contains the specified primary key values.
|
DataRow |
find(java.lang.String primaryKeyValue)
Gets the row specified by the primary key value.
|
DataRow |
get(int index)
Gets the row at the specified index.
|
DataRow |
get(java.lang.Object[] values)
Gets the row that contains the specified values.
|
int |
getCount()
Gets the total number of
DataRow objects in this collection. |
void |
insertAt(DataRow row,
int pos)
Inserts a new row into the collection at the specified location.
|
java.util.Iterator |
iterator()
Gets an
Iterator for this collection. |
void |
removeAt(int index)
Removes the row at the specified index from the collection.
|
public void add(DataRow row) throws ConstraintException, InvalidConstraintException
DataRow
to the DataRowCollection
object.row
- The DataRow
to add.ConstraintException
InvalidConstraintException
public void add(java.lang.Object... values) throws ConstraintException, InvalidConstraintException
DataRowCollection
.values
- The array of values that are used to create the new row.ConstraintException
InvalidConstraintException
public DataRow get(int index)
index
- The zero-based index of the row to return.DataRow
.public int getCount()
DataRow
objects in this collection.DataRow
objects in this collection.public java.util.Iterator iterator()
Iterator
for this collection.iterator
in interface java.lang.Iterable
Iterator
for this collection.public void clear()
public void insertAt(DataRow row, int pos) throws ConstraintException, InvalidConstraintException
row
- The DataRow
to add.pos
- The (zero-based) location in the collection where you want to add the DataRow.ConstraintException
InvalidConstraintException
public void removeAt(int index)
index
- The index of the row to remove.public DataRow find(java.lang.String primaryKeyValue)
primaryKeyValue
- The primary key value of the DataRow to find.public DataRow find(java.lang.Object[] keys)
keys
- An array of primary key values to find. The type of the array is Object.DataRow
object that contains the primary key values specified; otherwise a null value if the primary key value does not exist in the DataRowCollection
.public DataRow get(java.lang.Object[] values)
values
- row's datanull