org.apache.ddlutils.task
Class CreateDatabaseCommand

java.lang.Object
  extended by org.apache.ddlutils.task.Command
      extended by org.apache.ddlutils.task.DatabaseCommand
          extended by org.apache.ddlutils.task.CreateDatabaseCommand

public class CreateDatabaseCommand
extends DatabaseCommand

The sub task for creating the target database. Note that this is only supported on some database platforms. See the database support documentation for details on which platforms support this.
This sub task does not require schema files. Therefore the fileset subelement and the schemaFile attribute of the enclosing task can be omitted.

Version:
$Revision: 231306 $

Field Summary
 
Fields inherited from class org.apache.ddlutils.task.Command
_log
 
Constructor Summary
CreateDatabaseCommand()
           
 
Method Summary
 void addConfiguredParameter(Parameter param)
          Adds a parameter which is a name-value pair.
 void execute(DatabaseTaskBase task, Database model)
          Executes this command.
 boolean isRequiringModel()
          Specifies whether this command requires a model, i.e. whether the second argument in Command.execute(DatabaseTaskBase, Database) cannot be null.
 
Methods inherited from class org.apache.ddlutils.task.DatabaseCommand
getCatalogPattern, getDatabaseType, getDataSource, getPlatform, getSchemaPattern, setPlatformConfiguration
 
Methods inherited from class org.apache.ddlutils.task.Command
handleException, isFailOnError, setFailOnError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateDatabaseCommand

public CreateDatabaseCommand()
Method Detail

addConfiguredParameter

public void addConfiguredParameter(Parameter param)
Adds a parameter which is a name-value pair.

Parameters:
param - The parameter

isRequiringModel

public boolean isRequiringModel()
Specifies whether this command requires a model, i.e. whether the second argument in Command.execute(DatabaseTaskBase, Database) cannot be null.

Overrides:
isRequiringModel in class DatabaseCommand
Returns:
true if this command requires a model

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 task
model - The database model
Throws:
org.apache.tools.ant.BuildException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.