public class SqlTimestampConverter extends AbstractConverter<Timestamp>
Timestamp.| Constructor and Description |
|---|
SqlTimestampConverter()
Construct.
|
SqlTimestampConverter(int dateFormat)
Construct.
|
SqlTimestampConverter(int dateFormat,
int timeFormat)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
Timestamp |
convertToObject(String value,
Locale locale)
Converts the given
String value |
String |
convertToString(Timestamp timestamp,
Locale locale)
Converts the given value to a string.
|
protected Class<Timestamp> |
getTargetType() |
newConversionException, parsepublic SqlTimestampConverter()
public SqlTimestampConverter(int dateFormat)
dateFormat - See java.text.DateFormat for details. Defaults to DateFormat.SHORTpublic SqlTimestampConverter(int dateFormat,
int timeFormat)
dateFormat - See java.text.DateFormat for details. Defaults to DateFormat.SHORT * @param
timeFormat See java.text.DateFormat for details. Defaults to DateFormat.SHORTtimeFormat - public Timestamp convertToObject(String value, Locale locale)
IConverterString valuevalue - The string value to convertlocale - The locale used to convert the valueIConverter.convertToObject(java.lang.String,
java.util.Locale)public String convertToString(Timestamp timestamp, Locale locale)
IConverterconvertToString in interface IConverter<Timestamp>convertToString in class AbstractConverter<Timestamp>timestamp - The value to convertlocale - The locale used to convert the valueAbstractConverter.convertToString(java.lang.Object,
java.util.Locale)protected Class<Timestamp> getTargetType()
getTargetType in class AbstractConverter<Timestamp>AbstractConverter.getTargetType()Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.