Package org.castor.anttask
Class CastorDDLGenTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.castor.anttask.CastorDDLGenTask
- All Implemented Interfaces:
Cloneable
,org.apache.tools.ant.types.selectors.SelectorContainer
public final class CastorDDLGenTask
extends org.apache.tools.ant.taskdefs.MatchingTask
An Ant task to call the Castor
DDL Generator. It can be passed a file, a directory, a Fileset or all
three.
- Version:
- $Revision: 6543 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
- Author:
- Werner Guttmann
-
Field Summary
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFileset
(org.apache.tools.ant.types.FileSet set) Adds a fileset to process that contains schemas to process.void
execute()
Public execute method -- entry point for the Ant task.void
setDatabaseEngine
(String databaseEngine) Specifies the name of database engine to generate DDL for.void
setDatabaseEngineProperties
(String databaseEngineProperties) Specifies the name of a database specific properties file to be used during DDL generation.void
setDdlFileName
(String ddlFileName) Specifies the name of the DDL file to be generated.void
Sets the directory such that all schemas in this directory will have code generated for them.void
Sets the individual schema that will have code generated for it.void
setGlobalProperties
(String globalProperties) Specifies the name of a global properties file to be used during DDL generation.Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
-
Constructor Details
-
CastorDDLGenTask
public CastorDDLGenTask()
-
-
Method Details
-
setFile
Sets the individual schema that will have code generated for it.- Parameters:
file
- One schema file.
-
setDir
Sets the directory such that all schemas in this directory will have code generated for them.- Parameters:
dir
- The directory containing schemas to process.
-
addFileset
public void addFileset(org.apache.tools.ant.types.FileSet set) Adds a fileset to process that contains schemas to process.- Parameters:
set
- An individual file set containing schemas.
-
setDatabaseEngine
Specifies the name of database engine to generate DDL for.- Parameters:
databaseEngine
- Name of the database engine
-
setDatabaseEngineProperties
Specifies the name of a database specific properties file to be used during DDL generation.- Parameters:
databaseEngineProperties
- Database specific properties
-
setDdlFileName
Specifies the name of the DDL file to be generated.- Parameters:
ddlFileName
- Name of the DDL file to be generated
-
setGlobalProperties
Specifies the name of a global properties file to be used during DDL generation.- Parameters:
globalProperties
- Custom global properties for DDL generation.
-
execute
public void execute()Public execute method -- entry point for the Ant task. Loops over all schema that need code generated and creates needed code generators, then executes them. If anything goes wrong during execution of the Ant task a BuildException will be thrown.- Overrides:
execute
in classorg.apache.tools.ant.Task
- See Also:
-
Task.execute()
-