net.sourceforge.jdbcexporter.ant
Class ExportEntityDefElement

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.ant.EntityDefElement
      extended bynet.sourceforge.jdbcexporter.ant.ExportEntityDefElement

public class ExportEntityDefElement
extends EntityDefElement

The ExportEntityDefElement provides an Ant wrapper for setting a ExportEntityDef object from Ant.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  java.util.List columnElements
          The list of column def elements.
protected  DelimiterFormatterElement delimiterElement
          The delimiter formatter element.
protected  java.lang.String engineClassname
          The class name of the engine used for the export of this entity.
protected static org.apache.commons.logging.Log LOG
          The log for debug information.
protected  java.util.Map plugins
          The mapping between connection definition/delimiter formatter types and implementations.
 
Fields inherited from class net.sourceforge.jdbcimporter.ant.EntityDefElement
entityDef
 
Constructor Summary
ExportEntityDefElement(java.util.Map plugins)
          Constructs an EntityDefElement with the given mapping between connection definition/delimiter formatter types and implementations.
 
Method Summary
 ExportColumnDefElement createColumn()
          Creates an empty ExportColumnDefElement and returns it.
 DelimiterFormatterElement createDelimiter()
          Creates an empty DelimiterFormatterElement and returns it.
 ExportEntityDef getEntityDef()
          Returns the wrapped entity definition.
 void setEncoding(java.lang.String encoding)
          Sets the target file's encoding.
 void setEngine(java.lang.String className)
          Sets the class name of the engine used for the export of the entity.
 void setTarget(java.io.File file)
          Sets the target file of the exported data.
 void setWhere(java.lang.String clause)
          Sets the where clause used by the select statement.
 
Methods inherited from class net.sourceforge.jdbcimporter.ant.EntityDefElement
addConfiguredProperty, setCatalog, setSchema, setTable
 
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.


plugins

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


delimiterElement

protected DelimiterFormatterElement delimiterElement
The delimiter formatter element.


columnElements

protected java.util.List columnElements
The list of column def elements.


engineClassname

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

Constructor Detail

ExportEntityDefElement

public ExportEntityDefElement(java.util.Map plugins)
Constructs an EntityDefElement with the given mapping between connection definition/delimiter formatter types and implementations.

Parameters:
plugins - the plugin mappings
Method Detail

createColumn

public ExportColumnDefElement createColumn()
Creates an empty ExportColumnDefElement and returns it.

Returns:
the export column definition element

createDelimiter

public DelimiterFormatterElement createDelimiter()
Creates an empty DelimiterFormatterElement and returns it.

Returns:
the delimiter formatter element

setTarget

public void setTarget(java.io.File file)
Sets the target file of the exported data.

Parameters:
file - The file that will contain the exported data

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the target file's encoding.

Parameters:
encoding - the encoding charset
Since:
0.71

setWhere

public void setWhere(java.lang.String clause)
Sets the where clause used by the select statement.

Parameters:
clause - the where clause

setEngine

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

Parameters:
className - the class name

getEntityDef

public ExportEntityDef getEntityDef()
                             throws org.apache.tools.ant.BuildException
Returns the wrapped entity definition.

Returns:
the export entity definition
Throws:
org.apache.tools.ant.BuildException - if the entity definition's table, delimiter formatter or column definitions are invalid