net.sourceforge.jdbcimporter.ant
Class ColumnTranslatorElement

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.ant.ColumnTranslatorElement

public class ColumnTranslatorElement
extends java.lang.Object

The ColumnTranslatorElement provides an Ant wrapper for setting a ColumnTranslator object from Ant.

Version:
0.63
Author:
Chris Nagy

Field Summary
static java.lang.String PREFIX
          The prefix used in the properties to identify that this property is a column translator mapping.
 
Constructor Summary
ColumnTranslatorElement(java.util.Map plugins)
          Creates a ColumnTranslatorElement with the given mapping of column translator types to classes.
 
Method Summary
 void addConfiguredProperty(PropertyElement element)
          Add a property to the column translator.
 ColumnTranslator getTranslator()
          Returns the column translator.
protected  ColumnTranslator instantiateTranslator(java.lang.String className)
          Instantiate the column translator.
 void setClassname(java.lang.String name)
          Set the class name of the column translator and instantiate the column translator.
 void setType(java.lang.String type)
          Set the column translator type and instantiate the column translator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static java.lang.String PREFIX
The prefix used in the properties to identify that this property is a column translator mapping.

Constructor Detail

ColumnTranslatorElement

public ColumnTranslatorElement(java.util.Map plugins)
Creates a ColumnTranslatorElement with the given mapping of column translator types to classes.

Parameters:
plugins - the plugin mappings
Method Detail

setType

public void setType(java.lang.String type)
Set the column translator type and instantiate the column translator.

Parameters:
type - the column translator type

setClassname

public void setClassname(java.lang.String name)
Set the class name of the column translator and instantiate the column translator.

Parameters:
name - the class name of the column translator

instantiateTranslator

protected ColumnTranslator instantiateTranslator(java.lang.String className)
Instantiate the column translator.

Parameters:
className - the class name
Returns:
column translator

addConfiguredProperty

public void addConfiguredProperty(PropertyElement element)
Add a property to the column translator.

Parameters:
element - the property

getTranslator

public ColumnTranslator getTranslator()
Returns the column translator.

Returns:
column translator