org.databene.commons.converter
Class String2TimestampConverter

java.lang.Object
  extended by org.databene.commons.converter.ConverterWrapper<java.lang.String,java.util.Date>
      extended by org.databene.commons.converter.String2TimestampConverter
All Implemented Interfaces:
java.lang.Cloneable, Converter<java.lang.String,java.sql.Timestamp>, ThreadAware

public class String2TimestampConverter
extends ConverterWrapper<java.lang.String,java.util.Date>
implements Converter<java.lang.String,java.sql.Timestamp>

Parses Strings converting them to Timestamps.

Created at 01.10.2009 10:53:20

Since:
0.5.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.ConverterWrapper
realConverter
 
Constructor Summary
String2TimestampConverter()
           
 
Method Summary
 java.sql.Timestamp convert(java.lang.String sourceValue)
          Concerts an object of type S to an object of type T
 java.lang.Class<java.lang.String> getSourceType()
           
 java.lang.Class<java.sql.Timestamp> getTargetType()
           
 
Methods inherited from class org.databene.commons.converter.ConverterWrapper
clone, isParallelizable, isThreadSafe
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.databene.commons.ThreadAware
isParallelizable, isThreadSafe
 

Constructor Detail

String2TimestampConverter

public String2TimestampConverter()
Method Detail

getSourceType

public java.lang.Class<java.lang.String> getSourceType()
Specified by:
getSourceType in interface Converter<java.lang.String,java.sql.Timestamp>

getTargetType

public java.lang.Class<java.sql.Timestamp> getTargetType()
Specified by:
getTargetType in interface Converter<java.lang.String,java.sql.Timestamp>

convert

public java.sql.Timestamp convert(java.lang.String sourceValue)
                           throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Specified by:
convert in interface Converter<java.lang.String,java.sql.Timestamp>
Parameters:
sourceValue - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails


Copyright © 2010. All Rights Reserved.