Class WriteSchemaToDatabaseCommand
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.Command
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommand
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommandWithCreationParameters
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.WriteSchemaToDatabaseCommand
Parses the schema XML files specified for the enclosing task, and creates the corresponding
schema in the database.
- Version:
- $Revision: 289996 $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(DatabaseTaskBase task, Database model) Executes this command.protected boolean
Determines whether to alter the database if it already exists, or re-set it.protected boolean
Determines whether to drop tables and the associated constraints before re-creating them (this impliesalterDatabase
isfalse
).void
setAlterDatabase
(boolean alterTheDb) Specifies whether DdlUtils shall alter an existing database rather than clearing it and creating it new.void
setDoDrops
(boolean doDrops) Specifies whether tables, external constraints, etc.Methods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommandWithCreationParameters
addConfiguredParameter, getFilteredParameters
Methods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommand
getCatalogPattern, getDatabaseType, getDataSource, getPlatform, getSchemaPattern, isRequiringModel, setPlatformConfiguration
Methods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.Command
handleException, isFailOnError, setFailOnError
-
Constructor Details
-
WriteSchemaToDatabaseCommand
public WriteSchemaToDatabaseCommand()
-
-
Method Details
-
isAlterDatabase
protected boolean isAlterDatabase()Determines whether to alter the database if it already exists, or re-set it.- Returns:
true
if to alter the database
-
setAlterDatabase
public void setAlterDatabase(boolean alterTheDb) Specifies whether DdlUtils shall alter an existing database rather than clearing it and creating it new.- Parameters:
alterTheDb
-true
if to alter the database
-
isDoDrops
protected boolean isDoDrops()Determines whether to drop tables and the associated constraints before re-creating them (this impliesalterDatabase
isfalse
).- Returns:
true
if drops shall be performed
-
setDoDrops
public void setDoDrops(boolean doDrops) Specifies whether tables, external constraints, etc. can be dropped if necessary. Note that this is only relevant whenalterDatabase
isfalse
.- Parameters:
doDrops
-true
if drops shall be performed
-
execute
public void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException Executes this command.
-