org.unitils.dbunit.datasetloadstrategy.impl
Class BaseDataSetLoadStrategy
java.lang.Object
org.unitils.dbunit.datasetloadstrategy.impl.BaseDataSetLoadStrategy
- All Implemented Interfaces:
- DataSetLoadStrategy
- Direct Known Subclasses:
- CleanInsertLoadStrategy, InsertLoadStrategy, RefreshLoadStrategy, UpdateLoadStrategy
public abstract class BaseDataSetLoadStrategy
- extends Object
- implements DataSetLoadStrategy
Base implementation of DataSetLoadStrategy
. Exists only to free implementing classes from the burden of having
to convert checked exceptions into an unchecked UnitilsException
.
- Author:
- Filip Neven, Tim Ducheyne
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseDataSetLoadStrategy
public BaseDataSetLoadStrategy()
execute
public void execute(DbUnitDatabaseConnection dbUnitDatabaseConnection,
org.dbunit.dataset.IDataSet dataSet)
- Executes this DataSetLoadStrategy. This means the given dataset is inserted in the database using the given dbUnit
database connection object.
- Specified by:
execute
in interface DataSetLoadStrategy
- Parameters:
dbUnitDatabaseConnection
- DbUnit class providing access to the databasedataSet
- The dbunit dataset
doExecute
protected abstract void doExecute(DbUnitDatabaseConnection dbUnitDatabaseConnection,
org.dbunit.dataset.IDataSet dataSet)
throws org.dbunit.DatabaseUnitException,
SQLException
- Executes this DataSetLoadStrategy. This means the given dbunit dataset is inserted in the database
using the given dbUnit database connection object. This method declares all exceptions that are thrown by dbunit,
so that they don't have to be taken care of in the underlying implementation.
- Parameters:
dbUnitDatabaseConnection
- DbUnit class providing access to the databasedataSet
- The dbunit dataset
- Throws:
SQLException
- Exception thown by dbunit
org.dbunit.DatabaseUnitException
- Exception thown by dbunit
Copyright © 2011. All Rights Reserved.