Package org.dbunit.ant
Class DbConfig
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.dbunit.ant.DbConfig
- All Implemented Interfaces:
Cloneable
public class DbConfig
extends org.apache.tools.ant.ProjectComponent
The database configuration for the ant task.
- Since:
- 2.4.0
- Version:
- $Revision$ $Date$
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA named boolean feature flag, as configured in the Ant <dbconfig> task's <feature> element. -
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFeature(DbConfig.Feature feature) Adds a feature flag to be copied into theDatabaseConfigbycopyTo(DatabaseConfig).voidaddProperty(org.apache.tools.ant.taskdefs.Property property) Adds a property to be copied into theDatabaseConfigbycopyTo(DatabaseConfig).voidcopyTo(DatabaseConfig config) Copies the parameters set in this configuration via ant into the givenDatabaseConfigthat is used by the dbunit connection.Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
DbConfig
public DbConfig()Default constructor.
-
-
Method Details
-
addProperty
public void addProperty(org.apache.tools.ant.taskdefs.Property property) Adds a property to be copied into theDatabaseConfigbycopyTo(DatabaseConfig).- Parameters:
property- the property to add.
-
addFeature
Adds a feature flag to be copied into theDatabaseConfigbycopyTo(DatabaseConfig).- Parameters:
feature- the feature flag to add.
-
copyTo
Copies the parameters set in this configuration via ant into the givenDatabaseConfigthat is used by the dbunit connection.- Parameters:
config- The configuration object to be initialized/updated- Throws:
DatabaseUnitException- if a property value cannot be converted to its required type.
-