org.jete.db
Class DBSetupAction
java.lang.Object
org.jete.cases.ValidatedTestAction
org.jete.db.DBSetupAction
- All Implemented Interfaces:
- TestAction
- public class DBSetupAction
- extends ValidatedTestAction
Action to perform dbunit setup behavior. All behaviors are defined by the DatabaseOperation class,
these include:
- NONE
- UPDATE
- INSERT
- REFRESH
- DELETE
- DELETE_ALL
- TRUNCATE_TABLE
- CLEAN_INSERT
These operations are specified by passing the desired operation as a String. e.g. "TRUNCATE_TABLE". The operation
map is configured by the standard operation map factory, or by some other user defined means (like passing
the DB operations, or creating your own factory).
Operations may be configured differently via Spring to add additional, or specific DBUnit DatabaseOperation
support via the standard getter / setter paradigm.
If a dataset is set (not null), then that is used over any DataSetWrapper that is specified.
- Version:
- $Id: DBSetupAction.html,v 1.3 2006/03/12 02:46:57 tdeast Exp $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBSetupAction
public DBSetupAction()
doAction
protected void doAction()
throws ActionException
- Convert the specified db operation into the DBUnit specific operation. Then retrieve the specified DBUnit
flat file data, create a DB connection based on the configuration, and execute the opertation.
- Specified by:
doAction
in class ValidatedTestAction
- Throws:
ActionException
getDbOperations
public java.util.Collection getDbOperations()
setDbOperations
public void setDbOperations(java.util.Collection dbOperations)
getDataSource
public javax.sql.DataSource getDataSource()
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
getDataSetWrapper
public DataSetWrapper getDataSetWrapper()
setDataSetWrapper
public void setDataSetWrapper(DataSetWrapper dataSetWrapper)
getDataSet
public org.dbunit.dataset.IDataSet getDataSet()
setDataSet
public void setDataSet(org.dbunit.dataset.IDataSet dataSet)