net.sourceforge.jdbcexporter.ant
Class JDBCExporterTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bynet.sourceforge.jdbcexporter.ant.JDBCExporterTask

public class JDBCExporterTask
extends org.apache.tools.ant.Task

The JDBCExporterTask class is the Ant task that controls the export of data from the database.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  ConnectionDefElement connectionElement
          The ConnectionDefElement containing the connection definition.
protected  java.lang.String engineClassname
          The class name of the engine used for the export.
protected  java.util.List entityElements
          The list of entities to be exported.
protected  ExportDef exportDef
          The export definition.
protected static org.apache.commons.logging.Log LOG
          The log for debug information.
protected  java.util.Map plugins
          The mapping between connection definition/column translator/delimiter formatter types and implementations.
 
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
JDBCExporterTask()
          Creates a JDBCExporter Ant task.
 
Method Summary
 void addConfiguredProperty(PropertyElement element)
          Adds a property to the plugin properties.
 ConnectionDefElement createConnection()
          Creates an empty ConnectionDefElement and returns it.
 ExportEntityDefElement createEntity()
          Creates an empty EntityDefElement and returns it.
 void execute()
          Export data into the database by processing each entity definition via the export engine.
 void setEngine(java.lang.String className)
          Sets the class name of the engine used for the export.
 
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
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG
The log for debug information.


engineClassname

protected java.lang.String engineClassname
The class name of the engine used for the export.


exportDef

protected ExportDef exportDef
The export definition.


connectionElement

protected ConnectionDefElement connectionElement
The ConnectionDefElement containing the connection definition.


entityElements

protected java.util.List entityElements
The list of entities to be exported.


plugins

protected java.util.Map plugins
The mapping between connection definition/column translator/delimiter formatter types and implementations.

Constructor Detail

JDBCExporterTask

public JDBCExporterTask()
Creates a JDBCExporter Ant task.

Method Detail

setEngine

public void setEngine(java.lang.String className)
Sets the class name of the engine used for the export.

Parameters:
className -

createConnection

public ConnectionDefElement createConnection()
Creates an empty ConnectionDefElement and returns it.

Returns:
the connection definition element

createEntity

public ExportEntityDefElement createEntity()
Creates an empty EntityDefElement and returns it.

Returns:
the entity definition element

addConfiguredProperty

public void addConfiguredProperty(PropertyElement element)
Adds a property to the plugin properties.

Parameters:
element - the property element

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Export data into the database by processing each entity definition via the export engine.

Throws:
org.apache.tools.ant.BuildException - if the export could not be processed