it.openutils.testing
Annotation Type DbUnitExecution


@Retention(value=RUNTIME)
@Target(value=TYPE)
@Inherited
@Documented
public @interface DbUnitExecution

Version:
$Id: DbUnitExecution.java 1301 2009-08-25 09:41:04Z mmunaretto $
Author:
fgiust

Optional Element Summary
 java.lang.String[] datasets
          The resource locations to use for loading dbunit dataset.
 DatasetType datasetType
          The type of dataset to load.
 java.lang.String dataSource
          The name of the datasource to use.
 java.lang.Class<? extends org.dbunit.dataset.datatype.IDataTypeFactory> dataTypeFactory
          The datatype factory (DatabaseConfig.PROPERTY_DATATYPE_FACTORY) to use.
 java.lang.String excludedTables
          A regexp that can match table names.
 DbUnitFeature[] features
          A list of dbunit features that should be enabled or disabled on the connection.
 java.lang.Class<? extends org.dbunit.operation.DatabaseOperation> insertOperation
          The database operation that will be used to load datasets.
 DbUnitProperty[] properties
          A list of dbunit properties that should be set on the connection.
 java.lang.String schema
          Db schema name that will be given to dbUnit.
 boolean truncateAll
          If true, all the tables in the database will be truncated before loading any dataset.
 java.lang.Class<? extends org.dbunit.operation.DatabaseOperation> truncateOperation
          The database operation that will be used to truncate tables.
 

datasets

public abstract java.lang.String[] datasets
The resource locations to use for loading dbunit dataset.

Default:
{}

dataSource

public abstract java.lang.String dataSource
The name of the datasource to use. If can be left unset only if there is only one DataSource available in the Spring context.

Default:
""

schema

public abstract java.lang.String schema
Db schema name that will be given to dbUnit. Can be left unset if not needed (database specific)

Default:
""

dataTypeFactory

public abstract java.lang.Class<? extends org.dbunit.dataset.datatype.IDataTypeFactory> dataTypeFactory
The datatype factory (DatabaseConfig.PROPERTY_DATATYPE_FACTORY) to use. Can be left unset if not needed.

Default:
org.dbunit.dataset.datatype.DefaultDataTypeFactory.class

excludedTables

public abstract java.lang.String excludedTables
A regexp that can match table names. Any table matching this regular expression will not be considered by DbUnit. By default tables starting with BIN$ are ignored (oracle recycle bin).

Default:
"^BIN\\$(.*)"

truncateAll

public abstract boolean truncateAll
If true, all the tables in the database will be truncated before loading any dataset.

Default:
true

truncateOperation

public abstract java.lang.Class<? extends org.dbunit.operation.DatabaseOperation> truncateOperation
The database operation that will be used to truncate tables. Defaults to org.dbunit.operation.DeleteAllOperation

Default:
org.dbunit.operation.DeleteAllOperation.class

insertOperation

public abstract java.lang.Class<? extends org.dbunit.operation.DatabaseOperation> insertOperation
The database operation that will be used to load datasets. Defaults to org.dbunit.operation.InsertOperation. For Sql Server databases the default is automatically set to MsSqlIndentityInsertOperation (allow writing of identity columns).

Default:
org.dbunit.operation.InsertOperation.class

datasetType

public abstract DatasetType datasetType
The type of dataset to load. Defautils to XML, but automatically switches to EXCEL if you are using a file with the ".xml" extension. You need to explicitely set this only if you are using the "flat xml" format.

Default:
it.openutils.testing.dbunit.DatasetType.XML

features

public abstract DbUnitFeature[] features
A list of dbunit features that should be enabled or disabled on the connection. See http://www.dbunit.org/properties.html.

Default:
{}

properties

public abstract DbUnitProperty[] properties
A list of dbunit properties that should be set on the connection. See http://www.dbunit.org/properties.html.

Default:
{}


Copyright © 2005-2009 Openmind. All Rights Reserved.