org.databene.commons.converter
Class TimestampFormatter
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.ThreadSafeConverter<java.sql.Timestamp,java.lang.String>
org.databene.commons.converter.TimestampFormatter
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<java.sql.Timestamp,java.lang.String>, ThreadAware
public class TimestampFormatter
- extends ThreadSafeConverter<java.sql.Timestamp,java.lang.String>
Formats a Timestamp as String.
Created: 18.02.2010 17:46:14
- Since:
- 0.5.0
- Author:
- Volker Bergmann
|
Method Summary |
java.lang.String |
convert(java.sql.Timestamp sourceValue)
Concerts an object of type S to an object of type T |
java.lang.String |
format(java.sql.Timestamp timestamp)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimestampFormatter
public TimestampFormatter()
TimestampFormatter
public TimestampFormatter(java.lang.String prefixPattern)
TimestampFormatter
public TimestampFormatter(java.text.DateFormat format)
convert
public java.lang.String convert(java.sql.Timestamp sourceValue)
throws ConversionException
- Description copied from interface:
Converter
- Concerts an object of type S to an object of type T
- Parameters:
sourceValue - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
format
public java.lang.String format(java.sql.Timestamp timestamp)
Copyright © 2010. All Rights Reserved.