public class DefaultTable extends AbstractTable
| Constructor and Description |
|---|
DefaultTable(ITableMetaData metaData) |
DefaultTable(ITableMetaData metaData,
java.util.List list)
Deprecated.
Use public mutators to initialize table values instead
|
DefaultTable(java.lang.String tableName)
Creates a new empty table having the specified name.
|
DefaultTable(java.lang.String tableName,
Column[] columns)
Creates a new empty table with specified metadata.
|
DefaultTable(java.lang.String tableName,
Column[] columns,
java.util.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(java.lang.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.
|
java.lang.Object |
getValue(int row,
java.lang.String column)
Returns this table value for the specified row and column.
|
java.lang.Object |
setValue(int row,
java.lang.String column,
java.lang.Object value)
Replaces the value at the specified position in this table with the specified value.
|
java.lang.String |
toString() |
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndexpublic DefaultTable(ITableMetaData metaData, java.util.List list)
public DefaultTable(java.lang.String tableName)
public DefaultTable(java.lang.String tableName,
Column[] columns,
java.util.List list)
public DefaultTable(java.lang.String tableName,
Column[] columns)
public DefaultTable(ITableMetaData metaData)
public void addRow()
throws DataSetException
setValue(int, java.lang.String, java.lang.Object).DataSetExceptionpublic void addRow(java.lang.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 java.lang.Object setValue(int row,
java.lang.String column,
java.lang.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 java.lang.Object getValue(int row,
java.lang.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 getRowCountDataSetExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002-2018. All Rights Reserved.