org.apache.ddlutils.task
Class DatabaseToDdlTask

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.DatabaseToDdlTask

public class DatabaseToDdlTask
extends DatabaseTaskBase

Ant task for working with a database, e.g. retrieving the schema from a database, dumping data, etc.

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
DatabaseToDdlTask()
           
 
Method Summary
 void addWriteDataToDatabase(WriteDataToDatabaseCommand command)
          Adds the "write data into database"-command.
 void addWriteDataToFile(WriteDataToFileCommand command)
          Adds the "write data into file"-command.
 void addWriteDtdToFile(WriteDtdToFileCommand command)
          Adds the "create dtd"-command.
 void addWriteSchemaSqlToFile(WriteSchemaSqlToFileCommand command)
          Adds the "write schema sql to file"-command.
 void addWriteSchemaToFile(WriteSchemaToFileCommand command)
          Adds the "write schema to file"-command.
protected  Database readModel()
          Reads the database model on which the commands will work.
 void setCatalog(String catalog)
          Sets the database catalog to access.
 void setSchema(String schema)
          Sets the database schema to access.
 void setTableTypes(String tableTypes)
          Sets the table types ro recognize.
 
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

DatabaseToDdlTask

public DatabaseToDdlTask()
Method Detail

setSchema

public void setSchema(String schema)
Sets the database schema to access.

Parameters:
schema - The schema

setCatalog

public void setCatalog(String catalog)
Sets the database catalog to access.

Parameters:
catalog - The catalog

setTableTypes

public void setTableTypes(String tableTypes)
Sets the table types ro recognize.

Parameters:
tableTypes - The table types as a comma-separated list

addWriteDtdToFile

public void addWriteDtdToFile(WriteDtdToFileCommand command)
Adds the "create dtd"-command.

Parameters:
command - The command

addWriteSchemaToFile

public void addWriteSchemaToFile(WriteSchemaToFileCommand command)
Adds the "write schema to file"-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 into database"-command.

Parameters:
command - The command

addWriteDataToFile

public void addWriteDataToFile(WriteDataToFileCommand command)
Adds the "write data into 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.