Package org.dbunit.dataset
Class CachedDataSet
java.lang.Object
org.dbunit.dataset.AbstractDataSet
org.dbunit.dataset.CachedDataSet
- All Implemented Interfaces:
IDataSet,IDataSetConsumer
- Direct Known Subclasses:
CsvDataSet,CsvURLDataSet,FlatXmlDataSet,SqlLoaderControlDataSet,XmlDataSet,YamlDataSet
Hold copy of another dataset or a consumed provider content.
- Since:
- 1.x (Apr 18, 2003)
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Field Summary
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CachedDataSet(IDataSet dataSet) Creates a copy of the specified dataset.CachedDataSet(IDataSetProducer producer) Creates a CachedDataSet that synchronously consume the specified producer.CachedDataSet(IDataSetProducer producer, boolean caseSensitiveTableNames) Creates a CachedDataSet that synchronously consume the specified producer. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITableIteratorcreateIterator(boolean reversed) Creates an iterator which provides access to all tables of this datasetvoidReceive notification of the end of a dataset.voidendTable()Receive notification of the end of a table.voidReceive notification of a table row.voidReceive notification of the beginning of a dataset.voidstartTable(ITableMetaData metaData) Receive notification of the beginning of a table.Methods inherited from class org.dbunit.dataset.AbstractDataSet
createTableNameMap, getTable, getTableMetaData, getTableNames, getTables, initialize, isCaseSensitiveTableNames, iterator, reverseIterator, toString
-
Constructor Details
-
CachedDataSet
Default constructor.- Throws:
DataSetException
-
CachedDataSet
Creates a copy of the specified dataset.- Throws:
DataSetException
-
CachedDataSet
Creates a CachedDataSet that synchronously consume the specified producer.- Throws:
DataSetException
-
CachedDataSet
public CachedDataSet(IDataSetProducer producer, boolean caseSensitiveTableNames) throws DataSetException Creates a CachedDataSet that synchronously consume the specified producer.- Parameters:
producer-caseSensitiveTableNames- Whether or not case sensitive table names should be used- Throws:
DataSetException
-
-
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
-
startDataSet
Description copied from interface:IDataSetConsumerReceive notification of the beginning of a dataset. This method is invoked only once, before any other methods in this interface.- Specified by:
startDataSetin interfaceIDataSetConsumer- Throws:
DataSetException
-
endDataSet
Description copied from interface:IDataSetConsumerReceive notification of the end of a dataset. This method is invoked only once, and it will be the last method invoked in this interface.- Specified by:
endDataSetin interfaceIDataSetConsumer- Throws:
DataSetException
-
startTable
Description copied from interface:IDataSetConsumerReceive notification of the beginning of a table. This method is invoked at the beginning of every table in the dataset; there will be a correspondingIDataSetConsumer.endDataSet()event for everystartTableevent (even when the table is empty).- Specified by:
startTablein interfaceIDataSetConsumer- Parameters:
metaData- the table metadata- Throws:
DataSetException
-
endTable
Description copied from interface:IDataSetConsumerReceive notification of the end of a table.- Specified by:
endTablein interfaceIDataSetConsumer- Throws:
DataSetException
-
row
Description copied from interface:IDataSetConsumerReceive notification of a table row. This method is invoked to report each row of a table.- Specified by:
rowin interfaceIDataSetConsumer- Parameters:
values- The row values.- Throws:
DataSetException
-