net.sourceforge.jdbcimporter.ant
Class ImportEntityDefElement

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.ant.EntityDefElement
      extended bynet.sourceforge.jdbcimporter.ant.ImportEntityDefElement

public class ImportEntityDefElement
extends EntityDefElement

The ImportEntityDefElement provides an Ant wrapper for setting a ImportEntityDef object from Ant.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  java.util.List columnElements
          The list of columns.
protected  DelimiterParserElement delimiterElement
          The delimiter parser element.
protected  java.lang.String engineClassname
          The class name of the engine used for the import 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 parser types and implementations.
protected  RowTranslatorElement rowTranslatorElement
          The row translator element.
 
Fields inherited from class net.sourceforge.jdbcimporter.ant.EntityDefElement
entityDef
 
Constructor Summary
ImportEntityDefElement(java.util.Map plugins)
          Constructs an EntityDefElement with the given mapping between connection definition/delimiter parser types and implementations.
 
Method Summary
 DelegateColumnDefElement createColumn()
          Creates an empty ImportColumnDefElement and returns it.
 DelimiterParserElement createDelimiter()
          Creates an empty DelimiterParserElement and returns it.
 RowTranslatorElement createTranslator()
          Creates an empty RowTranslatorElement and returns it.
 ImportEntityDef getEntityDef()
          Returns the wrapped entity definition.
 void setEncoding(java.lang.String encoding)
          Sets the encoding of the source file.
 void setEngine(java.lang.String className)
          Sets the class name of the engine used for the import of the entity.
 void setSource(java.io.File file)
          Sets the source of the import data.
 
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 parser types and implementations.


delimiterElement

protected DelimiterParserElement delimiterElement
The delimiter parser element.


rowTranslatorElement

protected RowTranslatorElement rowTranslatorElement
The row translator element.

Since:
0.72

columnElements

protected java.util.List columnElements
The list of columns.


engineClassname

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

Constructor Detail

ImportEntityDefElement

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

Parameters:
plugins - the plugin mappings
Method Detail

createColumn

public DelegateColumnDefElement createColumn()
Creates an empty ImportColumnDefElement and returns it.

Returns:
import column definition element

createDelimiter

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

Returns:
delimiter parser element

createTranslator

public RowTranslatorElement createTranslator()
Creates an empty RowTranslatorElement and returns it.

Returns:
row translator element
Since:
0.72

setSource

public void setSource(java.io.File file)
Sets the source of the import data.

Parameters:
file - the file containing the data to import

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the encoding of the source file.

Parameters:
encoding - the encoding charset
Since:
0.71

setEngine

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

Parameters:
className - the class name

getEntityDef

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

Returns:
EntityDef the entity definition
Throws:
org.apache.tools.ant.BuildException - if the entity's table, delimiter parser is invalid