|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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,
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 |
Method Summary | |
---|---|
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. |
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, List list)
public DefaultTable(String tableName)
public DefaultTable(String tableName, Column[] columns, List list)
public DefaultTable(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(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 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 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 Object getValue(int row, 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 |