Package org.dbunit.util.fileloader
Interface DataFileLoader
- All Known Implementing Classes:
AbstractDataFileLoader,CsvDataFileLoader,FlatXmlDataFileLoader,FullXmlDataFileLoader,XlsDataFileLoader
public interface DataFileLoader
Defines a dbUnit data file loader supporting replacement objects and
substrings with
ReplacementDataSet.- Since:
- 2.4.8
- Version:
- $Revision$ $Date$
- Author:
- Jeff Jensen jeffjensen AT users.sourceforge.net, Last changed by: $Author$
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddReplacementObjects(Map replacementObjects) Add the specified replacement objects to existing ones for use withReplacementDataSet.voidaddReplacementSubstrings(Map replacementSubstrings) Add the specified replacement substrings to existing ones for use withReplacementDataSet.Load the specified String filename from the classpath into a dbUnit dataset.loadDataSet(URL url) Load the specified URL file into a dbUnit dataset.voidRemove all existing replacement objects, resetting to none so no object replacements occur.voidRemove all existing replacement substring objects, resetting to none so no substring replacements occur.
-
Method Details
-
load
Load the specified String filename from the classpath into a dbUnit dataset. If filename == null or "", then returns an emptyDefaultDataSet. The type of dbUnit dataset created is delegated to the implementing subclass.- Parameters:
filename- The dbUnit file to load, in the format for the loader implementation and fully qualified name with package syntax.- Returns:
- The dbUnit dataset of the specified file.
- Throws:
DatabaseUnitRuntimeException- DataSetException wrapped in a DatabaseUnitRuntimeException when file load errors occur.
-
loadDataSet
Load the specified URL file into a dbUnit dataset. The type of dbUnit dataset created is delegated to the implementing subclass.- Parameters:
url- The dbUnit data file url.- Returns:
- dbUnit dataset of the corresponding input file type.
- Throws:
DataSetException- On data errors.IOException- On file errors.- Since:
- 2.4.8
-
addReplacementObjects
Add the specified replacement objects to existing ones for use withReplacementDataSet.- Parameters:
replacementObjects- The replacement objects to include.- Since:
- 2.4.8
-
addReplacementSubstrings
Add the specified replacement substrings to existing ones for use withReplacementDataSet.- Parameters:
replacementSubstrings- The replacement substrings to include.- Since:
- 2.4.8
-
removeAllReplacementObjects
void removeAllReplacementObjects()Remove all existing replacement objects, resetting to none so no object replacements occur.- Since:
- 2.4.8
-
removeAllReplacementSubstrings
void removeAllReplacementSubstrings()Remove all existing replacement substring objects, resetting to none so no substring replacements occur.- Since:
- 2.4.8
-