net.sourceforge.jdbcimporter.columntranslator
Class SystemTimeColumnTranslator

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.columntranslator.SystemTimeColumnTranslator
All Implemented Interfaces:
ColumnTranslator

public class SystemTimeColumnTranslator
extends java.lang.Object
implements ColumnTranslator

The SystemTimeColumnTranslator translates a specific column value (default: 'SYSTEMTIME') into the current date/time if the column is of type 'DATE', 'TIMESTAMP' or 'TIME'.

Version:
0.6
Author:
Chris Nagy

Field Summary
static java.lang.String SYSTEM_TIME
          The default string that will be converted into the current date/time.
protected  java.lang.String translateFrom
          The column value that will be translated into the current/date time.
 
Constructor Summary
SystemTimeColumnTranslator()
           
 
Method Summary
 java.lang.String getTranslateFrom()
          Returns the column value that will be translated into the current date/time.
 ColumnValue getValue(ColumnDef column, ColumnValue columnValue)
          Returns the translated column value.
 void setTranslateFrom(java.lang.String newVal)
          Set the column value that will be translated into the current date/time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_TIME

public static final java.lang.String SYSTEM_TIME
The default string that will be converted into the current date/time.

See Also:
Constant Field Values

translateFrom

protected java.lang.String translateFrom
The column value that will be translated into the current/date time.

Constructor Detail

SystemTimeColumnTranslator

public SystemTimeColumnTranslator()
Method Detail

setTranslateFrom

public void setTranslateFrom(java.lang.String newVal)
Set the column value that will be translated into the current date/time.

Parameters:
newVal - the column value

getTranslateFrom

public java.lang.String getTranslateFrom()
Returns the column value that will be translated into the current date/time.

Returns:
the column value

getValue

public ColumnValue getValue(ColumnDef column,
                            ColumnValue columnValue)
Description copied from interface: ColumnTranslator
Returns the translated column value.

Specified by:
getValue in interface ColumnTranslator
Parameters:
column - the definition of the column
columnValue - the value of the column read from a file
Returns:
the new value of the column
See Also:
ColumnTranslator.getValue(ColumnDef, ColumnValue)