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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(DatabaseTaskBase task, Database model) Executes this command.protected booleanDetermines whether to alter the database if it already exists, or re-set it.protected booleanDetermines whether to drop tables and the associated constraints before re-creating them (this impliesalterDatabaseisfalse).voidsetAlterDatabase(boolean alterTheDb) Specifies whether DdlUtils shall alter an existing database rather than clearing it and creating it new.voidsetDoDrops(boolean doDrops) Specifies whether tables, external constraints, etc. can be dropped if necessary.Methods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommandWithCreationParameters
addConfiguredParameter, getFilteredParametersMethods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommand
getCatalogPattern, getDatabaseType, getDataSource, getPlatform, getSchemaPattern, isRequiringModel, setPlatformConfigurationMethods 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:
trueif 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-trueif to alter the database
-
isDoDrops
protected boolean isDoDrops()Determines whether to drop tables and the associated constraints before re-creating them (this impliesalterDatabaseisfalse).- Returns:
trueif 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 whenalterDatabaseisfalse.- Parameters:
doDrops-trueif drops shall be performed
-
execute
public void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException Executes this command.
-