|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbunit.util.fileloader.AbstractDataFileLoader
public abstract class AbstractDataFileLoader
Base class with common implementation for dbUnit data file loaders.
| Constructor Summary | |
|---|---|
AbstractDataFileLoader()
Create new instance. |
|
AbstractDataFileLoader(java.util.Map ro)
Create new instance with replacement objects. |
|
AbstractDataFileLoader(java.util.Map ro,
java.util.Map rs)
Create new instance with replacement objects and replacement substrings. |
|
| Method Summary | |
|---|---|
void |
addReplacementObjects(java.util.Map ro)
Add the specified replacement objects to existing ones for use with ReplacementDataSet. |
void |
addReplacementSubstrings(java.util.Map rs)
Add the specified replacement substrings to existing ones for use with ReplacementDataSet. |
IDataSet |
load(java.lang.String filename)
Load the specified filename from the classpath into a dbUnit dataset. |
protected abstract IDataSet |
loadDataSet(java.net.URL url)
Make the dbUnit dataset ( IDataSet) from the
input stream of a dbUnit data file. |
protected ReplacementDataSet |
processReplacementTokens(IDataSet ds)
Add the replacements in the maps (objects and substrings) to the specified dataset. |
void |
removeAllReplacementObjects()
Remove all existing replacement objects, resetting to none so no object replacements occur. |
void |
removeAllReplacementSubstrings()
Remove all existing replacement substring objects, resetting to none so no substring replacements occur. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDataFileLoader()
public AbstractDataFileLoader(java.util.Map ro)
replacementObjects - The replacement objects for use with
ReplacementDataSet.
public AbstractDataFileLoader(java.util.Map ro,
java.util.Map rs)
ro - The replacement objects for use with
ReplacementDataSet.rs - The replacement substrings for use with
ReplacementDataSet.| Method Detail |
|---|
public IDataSet load(java.lang.String filename)
throws DatabaseUnitRuntimeException
DefaultDataSet.
load in interface DataFileLoaderDatabaseUnitRuntimeException - DataSetException wrapped in a DatabaseUnitRuntimeException
when file load errors occur.
protected abstract IDataSet loadDataSet(java.net.URL url)
throws DataSetException,
java.io.IOException
IDataSet) from the
input stream of a dbUnit data file. The type of dbUnit dataset created is
delegated to the implementing subclass.
url - The dbUnit data file url.
DataSetException - On data errors.
java.io.IOException - On file errors.protected ReplacementDataSet processReplacementTokens(IDataSet ds)
ds - The dataset to wrap with a ReplacementDataSet and
process replacement tokens on.
ReplacementDataSet and processed with the tokens in
the replacement maps.public void addReplacementObjects(java.util.Map ro)
ReplacementDataSet.
addReplacementObjects in interface DataFileLoaderro - The replacement objects to include.public void addReplacementSubstrings(java.util.Map rs)
ReplacementDataSet.
addReplacementSubstrings in interface DataFileLoaderrs - The replacement substrings to include.public void removeAllReplacementObjects()
removeAllReplacementObjects in interface DataFileLoaderpublic void removeAllReplacementSubstrings()
removeAllReplacementSubstrings in interface DataFileLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||