org.apache.ddlutils.task
Class WriteSchemaToDatabaseCommand
java.lang.Object
org.apache.ddlutils.task.Command
org.apache.ddlutils.task.DatabaseCommand
org.apache.ddlutils.task.DatabaseCommandWithCreationParameters
org.apache.ddlutils.task.WriteSchemaToDatabaseCommand
public class WriteSchemaToDatabaseCommand
- extends DatabaseCommandWithCreationParameters
Parses the schema XML files specified for the enclosing task, and creates the corresponding
schema in the database.
- Version:
- $Revision: 289996 $
Fields inherited from class org.apache.ddlutils.task.Command |
_log |
Method Summary |
void |
execute(DatabaseTaskBase task,
Database model)
Executes this command. |
protected boolean |
isAlterDatabase()
Determines whether to alter the database if it already exists, or re-set it. |
protected boolean |
isDoDrops()
Determines whether to drop tables and the associated constraints before re-creating them
(this implies alterDatabase is false ). |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WriteSchemaToDatabaseCommand
public WriteSchemaToDatabaseCommand()
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 implies
alterDatabase
is false
).
- 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 when
alterDatabase
is false
.
- 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.
- Specified by:
execute
in class Command
- Parameters:
task
- The executing taskmodel
- The database model
- Throws:
org.apache.tools.ant.BuildException
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.