Package org.dbunit.dataset
Class FilteredDataSet
java.lang.Object
org.dbunit.dataset.AbstractDataSet
org.dbunit.dataset.FilteredDataSet
- All Implemented Interfaces:
IDataSet
Decorates a dataset and exposes only some tables from it. Can be used with
different filtering strategies.
- Since:
- Feb 22, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme, Last changed by: Luke Cann
- See Also:
-
Field Summary
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap -
Constructor Summary
ConstructorsConstructorDescriptionFilteredDataSet(String[] tableNames, IDataSet dataSet) Creates a FilteredDataSet that decorates the specified dataset and exposes only the specified tables usingSequenceTableFilteras filtering strategy.FilteredDataSet(ITableFilter filter, IDataSet dataSet) Creates a FilteredDataSet that decorates the specified dataset and exposes only the tables allowed by the specified filter. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITableIteratorcreateIterator(boolean reversed) Creates an iterator which provides access to all tables of this datasetReturns the specified table.getTableMetaData(String tableName) Returns the specified table metadata.String[]Returns names of tables in this dataset in proper sequence.Methods inherited from class org.dbunit.dataset.AbstractDataSet
createTableNameMap, getTables, initialize, isCaseSensitiveTableNames, iterator, reverseIterator, toString
-
Constructor Details
-
FilteredDataSet
Creates a FilteredDataSet that decorates the specified dataset and exposes only the specified tables usingSequenceTableFilteras filtering strategy.- Throws:
AmbiguousTableNameException- If the given tableNames array contains ambiguous names
-
FilteredDataSet
Creates a FilteredDataSet that decorates the specified dataset and exposes only the tables allowed by the specified filter.- Parameters:
filter- the filtering strategydataSet- the filtered dataset
-
-
Method Details
-
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
-
getTableNames
Description copied from interface:IDataSetReturns names of tables in this dataset in proper sequence. Multiple occurrence of the same name may be returned if multiple tables having the same name are present in the dataset.- Specified by:
getTableNamesin interfaceIDataSet- Overrides:
getTableNamesin classAbstractDataSet- Throws:
DataSetException
-
getTableMetaData
Description copied from interface:IDataSetReturns the specified table metadata.- Specified by:
getTableMetaDatain interfaceIDataSet- Overrides:
getTableMetaDatain classAbstractDataSet- Throws:
DataSetException
-
getTable
Description copied from interface:IDataSetReturns the specified table.- Specified by:
getTablein interfaceIDataSet- Overrides:
getTablein classAbstractDataSet- Throws:
DataSetException
-