Package org.dbunit.dataset.sqlloader
Class SqlLoaderControlProducer
java.lang.Object
org.dbunit.dataset.sqlloader.SqlLoaderControlProducer
- All Implemented Interfaces:
IDataSetProducer
Producer that creates an
IDataSet using SQLLoader style '.ctl' files.- Since:
- 2.4.0
- Version:
- $Revision$ $Date$
- Author:
- Stephan Strittmatter (stritti AT users.sourceforge.net), gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSqlLoaderControlProducer(File controlFilesDir, File tableOrderFile) The Constructor.SqlLoaderControlProducer(File controlFilesDir, List orderedTableNames) The Constructor.SqlLoaderControlProducer(String controlFilesDir, String tableOrderFile) The Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ListGet a list of tables that this producer will create.voidproduce()Process this dataset source.voidsetConsumer(IDataSetConsumer consumer)
-
Field Details
-
NULL
The Constant NULL.- See Also:
-
-
Constructor Details
-
SqlLoaderControlProducer
public SqlLoaderControlProducer(String controlFilesDir, String tableOrderFile) throws DataSetException The Constructor.- Parameters:
controlFilesDir- the control files directorytableOrderFile- the table order file- Throws:
DataSetException
-
SqlLoaderControlProducer
The Constructor.- Parameters:
controlFilesDir- the control files directorytableOrderFile- the table order file- Throws:
DataSetException
-
SqlLoaderControlProducer
The Constructor.- Parameters:
controlFilesDir- the control files directoryorderedTableNames- a list of strings that contains the ordered table names
-
-
Method Details
-
setConsumer
- Specified by:
setConsumerin interfaceIDataSetProducer- Throws:
DataSetException- See Also:
-
produce
Description copied from interface:IDataSetProducerProcess this dataset source. During the processing, the IDataSetProducer will provide information about the dataset through the specified event listener.This method is synchronous: it will not return until processing has ended. If a client application wants to terminate parsing early, it should throw an exception from the listener.
- Specified by:
producein interfaceIDataSetProducer- Throws:
DataSetException- See Also:
-
getTables
Get a list of tables that this producer will create.- Parameters:
controlFilesDir- the base directorytableList- the table list- Returns:
- a list of Strings, where each item is a CSV file relative to the base URL
- Throws:
IOException- when IO on the base URL has issues.
-