org.apache.ddlutils.task
Class WriteSchemaToDatabaseCommand

java.lang.Object
  extended byorg.apache.ddlutils.task.DatabaseCommand
      extended byorg.apache.ddlutils.task.DatabaseCommandWithCreationParameters
          extended byorg.apache.ddlutils.task.WriteSchemaToDatabaseCommand
All Implemented Interfaces:
Command

public class WriteSchemaToDatabaseCommand
extends DatabaseCommandWithCreationParameters

Command for writing a database schema into the database.

Version:
$Revision: 289996 $
Author:
Thomas Dudziak

Constructor Summary
WriteSchemaToDatabaseCommand()
           
 
Method Summary
 void execute(org.apache.tools.ant.Task 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 if necessary.
 void setAlterDatabase(boolean alterTheDb)
          Specifies whether to alter the database if it already exists, or re-set it.
 void setDoDrops(boolean doDrops)
          Specifies whether to drop tables and the associated constraints if necessary.
 
Methods inherited from class org.apache.ddlutils.task.DatabaseCommandWithCreationParameters
addConfiguredParameter, getFilteredParameters
 
Methods inherited from class org.apache.ddlutils.task.DatabaseCommand
getDatabaseType, getDataSource, getPlatform, isFailOnError, isRequiringModel, setFailOnError, setPlatformConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteSchemaToDatabaseCommand

public WriteSchemaToDatabaseCommand()
Method Detail

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 to alter the database if it already exists, or re-set it.

Parameters:
alterTheDb - true if to alter the database

isDoDrops

protected boolean isDoDrops()
Determines whether to drop tables and the associated constraints if necessary.

Returns:
true if drops shall be performed

setDoDrops

public void setDoDrops(boolean doDrops)
Specifies whether to drop tables and the associated constraints if necessary.

Parameters:
doDrops - true if drops shall be performed

execute

public void execute(org.apache.tools.ant.Task task,
                    Database model)
             throws org.apache.tools.ant.BuildException
Executes this command.

Parameters:
task - The executing task
model - The database model
Throws:
org.apache.tools.ant.BuildException


Copyright © 2005 Apache Software Foundation. All Rights Reserved.