org.apache.ddlutils.task
Class DdlToDatabaseTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.ddlutils.task.DatabaseTaskBase
              extended byorg.apache.ddlutils.task.DdlToDatabaseTask

public class DdlToDatabaseTask
extends DatabaseTaskBase

Ant task for working with DDL, e.g. generating the database from a schema, inserting data.

Version:
$Revision: 289996 $
Author:
Thomas Dudziak

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
DdlToDatabaseTask()
           
 
Method Summary
 void addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
          Adds a fileset.
 void addCreateDatabase(CreateDatabaseCommand command)
          Adds the "create database"-command.
 void addDropDatabase(DropDatabaseCommand command)
          Adds the "drop database"-command.
 void addWriteDataToDatabase(WriteDataToDatabaseCommand command)
          Adds the "write data to database"-command.
 void addWriteDataToFile(WriteDataToFileCommand command)
          Adds the "write data to file"-command.
 void addWriteDtdToFile(WriteDtdToFileCommand command)
          Adds the "write dtd to file"-command.
 void addWriteSchemaSqlToFile(WriteSchemaSqlToFileCommand command)
          Adds the "write schema sql to file"-command.
 void addWriteSchemaToDatabase(WriteSchemaToDatabaseCommand command)
          Adds the "write schema to database"-command.
protected  Database readModel()
          Reads the database model on which the commands will work.
 void setSchemaFile(File schemaFile)
          Set the xml schema describing the application model.
 void setUseInternalDtd(boolean useInternalDtd)
          Specifies whether XML input files are validated against the internal or an external DTD.
 void setValidateXml(boolean validateXml)
          Specifies whether XML input files are validated at all.
 
Methods inherited from class org.apache.ddlutils.task.DatabaseTaskBase
addCommand, addConfiguredDatabase, execute, executeCommands, getCommands, getDatabaseType, getDataSource, getPlatform, hasCommands, isUseDelimitedSqlIdentifiers, setDatabaseType, setUseDelimitedSqlIdentifiers
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DdlToDatabaseTask

public DdlToDatabaseTask()
Method Detail

setUseInternalDtd

public void setUseInternalDtd(boolean useInternalDtd)
Specifies whether XML input files are validated against the internal or an external DTD.

Parameters:
useInternalDtd - true if input files are to be validated against the internal DTD

setValidateXml

public void setValidateXml(boolean validateXml)
Specifies whether XML input files are validated at all.

Parameters:
validateXml - true if input files are to be validated

addConfiguredFileset

public void addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
Adds a fileset.

Parameters:
fileset - The additional input files

setSchemaFile

public void setSchemaFile(File schemaFile)
Set the xml schema describing the application model.

Parameters:
schemaFile - The schema

addCreateDatabase

public void addCreateDatabase(CreateDatabaseCommand command)
Adds the "create database"-command.

Parameters:
command - The command

addDropDatabase

public void addDropDatabase(DropDatabaseCommand command)
Adds the "drop database"-command.

Parameters:
command - The command

addWriteDtdToFile

public void addWriteDtdToFile(WriteDtdToFileCommand command)
Adds the "write dtd to file"-command.

Parameters:
command - The command

addWriteSchemaToDatabase

public void addWriteSchemaToDatabase(WriteSchemaToDatabaseCommand command)
Adds the "write schema to database"-command.

Parameters:
command - The command

addWriteSchemaSqlToFile

public void addWriteSchemaSqlToFile(WriteSchemaSqlToFileCommand command)
Adds the "write schema sql to file"-command.

Parameters:
command - The command

addWriteDataToDatabase

public void addWriteDataToDatabase(WriteDataToDatabaseCommand command)
Adds the "write data to database"-command.

Parameters:
command - The command

addWriteDataToFile

public void addWriteDataToFile(WriteDataToFileCommand command)
Adds the "write data to file"-command.

Parameters:
command - The command

readModel

protected Database readModel()
Reads the database model on which the commands will work.

Specified by:
readModel in class DatabaseTaskBase
Returns:
The database model


Copyright © 2005 Apache Software Foundation. All Rights Reserved.