org.unitils.dbunit.datasetloadstrategy
Interface DataSetLoadStrategy
- All Known Implementing Classes:
- BaseDataSetLoadStrategy, CleanInsertLoadStrategy, InsertLoadStrategy, RefreshLoadStrategy, UpdateLoadStrategy
public interface DataSetLoadStrategy
Defines the contract for implementations that specify an operation that needs to be executed on the database, given
a DbUnit dataset. Implementations typically call an implementation of DbUnit's DatabaseOperation
class.
Implementations must have an empty constructor so that an instance can be created using reflection.
The concrete implementation class that is used can be configured using the annotation attribute
DataSet.loadStrategy()
. A default can be specified using the property
DbUnitModule.DataSet.loadStrategy.default
.
This wrapper mechanism makes it very easy to use custom DbUnit DatabaseOperation
composite object
structures, without sacrificing the powerfulness of Unitils' configuration system.
- Author:
- Filip Neven, Tim Ducheyne
execute
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.
- Parameters:
dbUnitDatabaseConnection
- DbUnit class providing access to the databasedataSet
- The dbunit dataset
Copyright © 2011. All Rights Reserved.