org.dbunit.dataset
Class CompositeDataSet

java.lang.Object
  extended by org.dbunit.dataset.AbstractDataSet
      extended by org.dbunit.dataset.CompositeDataSet
All Implemented Interfaces:
IDataSet

public class CompositeDataSet
extends AbstractDataSet

Combines multiple datasets into a single logical dataset.

Since:
Feb 19, 2002
Version:
$Revision$
Author:
Manuel Laflamme

Field Summary
 
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap
 
Constructor Summary
CompositeDataSet(IDataSet dataSet)
          Creates a composite dataset that combines duplicate tables of the specified dataset.
CompositeDataSet(IDataSet[] dataSets)
          Creates a composite dataset that combines specified datasets.
CompositeDataSet(IDataSet[] dataSets, boolean combine)
          Creates a composite dataset that combines specified datasets.
CompositeDataSet(IDataSet[] dataSets, boolean combine, boolean caseSensitiveTableNames)
          Creates a composite dataset that combines specified datasets.
CompositeDataSet(IDataSet dataSet, boolean combine)
          Deprecated. This constructor is useless when the combine parameter is false. Use overload that doesn't have the combine argument.
CompositeDataSet(IDataSet dataSet1, IDataSet dataSet2)
          Creates a composite dataset that combines the two specified datasets.
CompositeDataSet(IDataSet dataSet1, IDataSet dataSet2, boolean combine)
          Creates a composite dataset that combines the two specified datasets.
CompositeDataSet(ITable[] tables)
          Creates a composite dataset that combines tables having identical name.
CompositeDataSet(ITable[] tables, boolean caseSensitiveTableNames)
          Creates a composite dataset that combines tables having identical name.
 
Method Summary
protected  ITableIterator createIterator(boolean reversed)
          Creates an iterator which provides access to all tables of this dataset
 
Methods inherited from class org.dbunit.dataset.AbstractDataSet
createTableNameMap, getTable, getTableMetaData, getTableNames, getTables, isCaseSensitiveTableNames, iterator, reverseIterator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeDataSet

public CompositeDataSet(IDataSet[] dataSets)
                 throws DataSetException
Creates a composite dataset that combines specified datasets. Tables having the same name are merged into one table.

Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(IDataSet[] dataSets,
                        boolean combine)
                 throws DataSetException
Creates a composite dataset that combines specified datasets.

Parameters:
dataSets - list of datasets
combine - if true, tables having the same name are merged into one table.
Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(IDataSet[] dataSets,
                        boolean combine,
                        boolean caseSensitiveTableNames)
                 throws DataSetException
Creates a composite dataset that combines specified datasets.

Parameters:
dataSets - list of datasets
combine - if true, tables having the same name are merged into one table.
caseSensitiveTableNames - Whether or not table names are handled in a case sensitive way over all datasets.
Throws:
DataSetException
Since:
2.4.2

CompositeDataSet

public CompositeDataSet(IDataSet dataSet1,
                        IDataSet dataSet2)
                 throws DataSetException
Creates a composite dataset that combines the two specified datasets. Tables having the same name are merged into one table.

Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(IDataSet dataSet1,
                        IDataSet dataSet2,
                        boolean combine)
                 throws DataSetException
Creates a composite dataset that combines the two specified datasets.

Parameters:
dataSet1 - first dataset
dataSet2 - second dataset
combine - if true, tables having the same name are merged into one table.
Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(IDataSet dataSet,
                        boolean combine)
                 throws DataSetException
Deprecated. This constructor is useless when the combine parameter is false. Use overload that doesn't have the combine argument.

Creates a composite dataset that combines duplicate tables of the specified dataset.

Parameters:
dataSet - the dataset
combine - if true, tables having the same name are merged into one table.
Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(IDataSet dataSet)
                 throws DataSetException
Creates a composite dataset that combines duplicate tables of the specified dataset.

Parameters:
dataSet - the dataset
Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(ITable[] tables)
                 throws DataSetException
Creates a composite dataset that combines tables having identical name. Tables having the same name are merged into one table.

Throws:
DataSetException

CompositeDataSet

public CompositeDataSet(ITable[] tables,
                        boolean caseSensitiveTableNames)
                 throws DataSetException
Creates a composite dataset that combines tables having identical name. Tables having the same name are merged into one table.

Parameters:
tables - The tables to merge to one dataset
caseSensitiveTableNames - Whether or not table names are handled in a case sensitive way over all datasets.
Throws:
DataSetException
Since:
2.4.2
Method Detail

createIterator

protected ITableIterator createIterator(boolean reversed)
                                 throws DataSetException
Description copied from class: AbstractDataSet
Creates an iterator which provides access to all tables of this dataset

Specified by:
createIterator in class AbstractDataSet
Parameters:
reversed - Whether the created iterator should be a reversed one or not
Returns:
The created ITableIterator
Throws:
DataSetException


Copyright © 2002–2014. All rights reserved.