org.unitils.dbunit.datasetloadstrategy.impl
Class UpdateLoadStrategy
java.lang.Object
org.unitils.dbunit.datasetloadstrategy.impl.BaseDataSetLoadStrategy
org.unitils.dbunit.datasetloadstrategy.impl.UpdateLoadStrategy
- All Implemented Interfaces:
- DataSetLoadStrategy
public class UpdateLoadStrategy
- extends BaseDataSetLoadStrategy
DataSetLoadStrategy that updates the contents of the database with the contents of the dataset. This means
that data of existing rows is updated. Fails if the dataset contains records that are not in the database (i.e. a records having the same value for the
primary key column).
- Author:
- Filip Neven, Tim Ducheyne
- See Also:
DatabaseOperation.UPDATE
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpdateLoadStrategy
public UpdateLoadStrategy()
doExecute
protected void doExecute(DbUnitDatabaseConnection dbUnitDatabaseConnection,
org.dbunit.dataset.IDataSet dataSet)
throws org.dbunit.DatabaseUnitException,
SQLException
- Description copied from class:
BaseDataSetLoadStrategy
- 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.
- Specified by:
doExecute in class BaseDataSetLoadStrategy
- Parameters:
dbUnitDatabaseConnection - DbUnit class providing access to the databasedataSet - The dbunit dataset
- Throws:
org.dbunit.DatabaseUnitException - Exception thown by dbunit
SQLException - Exception thown by dbunit
Copyright © 2011. All Rights Reserved.