Package org.dbunit.dataset
Class DefaultDataSet
java.lang.Object
org.dbunit.dataset.AbstractDataSet
org.dbunit.dataset.DefaultDataSet
- All Implemented Interfaces:
IDataSet
Simple implementation of a dataset backed by
ITable objects which can
be added dynamically.- Since:
- 1.0 (Feb 18, 2002)
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Field Summary
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDataSet(boolean caseSensitiveTableNames) Creates a default dataset which is empty initiallyDefaultDataSet(ITable table) DefaultDataSet(ITable[] tables) DefaultDataSet(ITable[] tables, boolean caseSensitiveTableNames) Creates a default dataset which consists of the given tablesDefaultDataSet(ITable table1, ITable table2) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new table in this dataset.protected ITableIteratorcreateIterator(boolean reversed) Creates an iterator which provides access to all tables of this datasetprotected voidInitializes theAbstractDataSet._orderedTableNameMapof the parent class if it is not initialized yet.Methods inherited from class org.dbunit.dataset.AbstractDataSet
createTableNameMap, getTable, getTableMetaData, getTableNames, getTables, isCaseSensitiveTableNames, iterator, reverseIterator, toString
-
Constructor Details
-
DefaultDataSet
public DefaultDataSet() -
DefaultDataSet
public DefaultDataSet(boolean caseSensitiveTableNames) Creates a default dataset which is empty initially- Parameters:
caseSensitiveTableNames-- Since:
- 2.4.2
-
DefaultDataSet
- Throws:
AmbiguousTableNameException
-
DefaultDataSet
- Throws:
AmbiguousTableNameException
-
DefaultDataSet
- Throws:
AmbiguousTableNameException
-
DefaultDataSet
public DefaultDataSet(ITable[] tables, boolean caseSensitiveTableNames) throws AmbiguousTableNameException Creates a default dataset which consists of the given tables- Parameters:
caseSensitiveTableNames-- Throws:
AmbiguousTableNameException- Since:
- 2.4.2
-
-
Method Details
-
addTable
Add a new table in this dataset.- Throws:
AmbiguousTableNameException
-
initialize
protected void initialize()Initializes theAbstractDataSet._orderedTableNameMapof the parent class if it is not initialized yet.- Overrides:
initializein classAbstractDataSet- Throws:
DataSetException- Since:
- 2.4.6
-
createIterator
Description copied from class:AbstractDataSetCreates an iterator which provides access to all tables of this dataset- Specified by:
createIteratorin classAbstractDataSet- Parameters:
reversed- Whether the created iterator should be a reversed one or not- Returns:
- The created
ITableIterator - Throws:
DataSetException
-