public class DefaultTable extends AbstractTable
| Constructor and Description |
|---|
DefaultTable(ITableMetaData metaData) |
DefaultTable(ITableMetaData metaData,
List list)
Deprecated.
Use public mutators to initialize table values instead
|
DefaultTable(String tableName)
Creates a new empty table having the specified name.
|
DefaultTable(String tableName,
Column[] columns)
Creates a new empty table with specified metadata.
|
DefaultTable(String tableName,
Column[] columns,
List list)
Deprecated.
Use public mutators to initialize table values instead
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRow()
Inserts a new empty row.
|
void |
addRow(Object[] values)
Inserts a new row initialized with specified array of values.
|
void |
addTableRows(ITable table)
Inserts all rows from the specified table.
|
int |
getRowCount()
Returns this table row count.
|
ITableMetaData |
getTableMetaData()
Returns this table metadata.
|
Object |
getValue(int row,
String column)
Returns this table value for the specified row and column.
|
Object |
setValue(int row,
String column,
Object value)
Replaces the value at the specified position in this table with the specified value.
|
String |
toString() |
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndexpublic DefaultTable(ITableMetaData metaData, List list)
public DefaultTable(String tableName)
public DefaultTable(String tableName, Column[] columns, List list)
public DefaultTable(String tableName, Column[] columns)
public DefaultTable(ITableMetaData metaData)
public void addRow()
throws DataSetException
setValue(int, java.lang.String, java.lang.Object).DataSetExceptionpublic void addRow(Object[] values) throws DataSetException
values - The array of values. Each value correspond to the column at the
same index from ITableMetaData.getColumns().DataSetExceptiongetTableMetaData()public void addTableRows(ITable table) throws DataSetException
table - The source table.DataSetExceptionpublic Object setValue(int row, String column, Object value) throws RowOutOfBoundsException, NoSuchColumnException, DataSetException
row - The row indexcolumn - The column namevalue - The value to store at the specified locationRowOutOfBoundsException - if the row index is out of rangeNoSuchColumnException - if the column does not existDataSetException - if an unexpected error occurspublic ITableMetaData getTableMetaData()
ITablepublic int getRowCount()
ITablepublic Object getValue(int row, String column) throws DataSetException
ITablerow - The row index, starting with 0column - The name of the columnNoSuchColumnException - if specified column name do not exist in
this tableRowOutOfBoundsException - if specified row is less than zero or
equals or greater than getRowCountDataSetExceptionCopyright © 2002-2017. All Rights Reserved.