Package org.dbunit.dataset
Class CompositeTable
java.lang.Object
org.dbunit.dataset.AbstractTable
org.dbunit.dataset.CompositeTable
- All Implemented Interfaces:
ITable
ITable that pairs explicit ITableMetaData with row data drawn
from one or more other tables.- Since:
- Feb 17, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeTable(String newName, ITable table) Creates a composite dataset that encapsulate the specified table with a new name.CompositeTable(ITableMetaData metaData, ITable table) Creates a composite table that combines the specified metadata with the specified table.CompositeTable(ITableMetaData metaData, ITable[] tables) Creates a composite table that combines the specified metadata with the specified tables.CompositeTable(ITable table1, ITable table2) Creates a composite table that combines the specified specified tables. -
Method Summary
Modifier and TypeMethodDescriptionintReturns this table row count.Returns this table metadata.Returns this table value for the specified row and column.toString()Methods inherited from class org.dbunit.dataset.AbstractTable
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndex
-
Constructor Details
-
CompositeTable
Creates a composite table that combines the specified metadata with the specified table.- Parameters:
metaData- the table metadata.table- the table providing row data.
-
CompositeTable
Creates a composite table that combines the specified metadata with the specified tables.- Parameters:
metaData- the table metadata.tables- the tables providing row data.
-
CompositeTable
Creates a composite table that combines the specified specified tables. The metadata from the first table is used as metadata for the new table.- Parameters:
table1- the first table, whose metadata is used for the new table.table2- the second table.
-
CompositeTable
Creates a composite dataset that encapsulate the specified table with a new name.- Parameters:
newName- the new table name.table- the table to rename.- Throws:
DataSetException- if the new metadata cannot be built.
-
-
Method Details
-
getTableMetaData
Description copied from interface:ITableReturns this table metadata.- Returns:
- this table metadata.
-
getRowCount
public int getRowCount()Description copied from interface:ITableReturns this table row count.- Returns:
- this table row count.
-
getValue
Description copied from interface:ITableReturns this table value for the specified row and column.- Parameters:
row- The row index, starting with 0columnName- The name of the column- Returns:
- The value
- Throws:
DataSetException
-
toString
-