|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbunit.dataset.AbstractTable org.dbunit.dataset.DefaultTable
public class DefaultTable
Field Summary |
---|
Fields inherited from interface org.dbunit.dataset.ITable |
---|
NO_VALUE |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class org.dbunit.dataset.AbstractTable |
---|
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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)
Method Detail |
---|
public void addRow() throws DataSetException
setValue(int, java.lang.String, java.lang.Object)
.
DataSetException
public 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()
.
DataSetException
getTableMetaData()
public void addTableRows(ITable table) throws DataSetException
table
- The source table.
DataSetException
public 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 location
RowOutOfBoundsException
- if the row index is out of range
NoSuchColumnException
- if the column does not exist
DataSetException
- if an unexpected error occurspublic ITableMetaData getTableMetaData()
ITable
public int getRowCount()
ITable
public java.lang.Object getValue(int row, java.lang.String column) throws DataSetException
ITable
NoSuchColumnException
- if specfied column name do not exist in
this table
RowOutOfBoundsException
- if specfied row is less than zero or
equals or greater than getRowCount
DataSetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |