org.dbunit.dataset
Class DefaultDataSet

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

public class DefaultDataSet
extends AbstractDataSet

Simple implementation of a dataset backed by ITable objects which can be added dynamically.

Since:
1.0 (Feb 18, 2002)
Version:
$Revision: 1014 $ $Date: 2009-06-01 13:44:23 -0500 (Mon, 01 Jun 2009) $
Author:
Manuel Laflamme, Last changed by: $Author: gommma $

Field Summary
 
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap
 
Constructor Summary
DefaultDataSet()
           
DefaultDataSet(boolean caseSensitiveTableNames)
          Creates a default dataset which is empty initially
DefaultDataSet(ITable table)
           
DefaultDataSet(ITable[] tables)
           
DefaultDataSet(ITable[] tables, boolean caseSensitiveTableNames)
          Creates a default dataset which consists of the given tables
DefaultDataSet(ITable table1, ITable table2)
           
 
Method Summary
 void addTable(ITable table)
          Add a new table in this dataset.
protected  ITableIterator createIterator(boolean reversed)
          Creates an iterator which provides access to all tables of this dataset
protected  void initialize()
          Initializes the _orderedTableNameMap of 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultDataSet

public DefaultDataSet()

DefaultDataSet

public DefaultDataSet(boolean caseSensitiveTableNames)
Creates a default dataset which is empty initially

Parameters:
caseSensitiveTableNames -
Since:
2.4.2

DefaultDataSet

public DefaultDataSet(ITable table)
               throws AmbiguousTableNameException
Throws:
AmbiguousTableNameException

DefaultDataSet

public DefaultDataSet(ITable table1,
                      ITable table2)
               throws AmbiguousTableNameException
Throws:
AmbiguousTableNameException

DefaultDataSet

public DefaultDataSet(ITable[] tables)
               throws AmbiguousTableNameException
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 Detail

addTable

public void addTable(ITable table)
              throws AmbiguousTableNameException
Add a new table in this dataset.

Throws:
AmbiguousTableNameException

initialize

protected void initialize()
Initializes the _orderedTableNameMap of the parent class if it is not initialized yet.

Throws:
DataSetException
Since:
2.4.6

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-2012. All Rights Reserved.