public class SqlTimestampConverter extends AbstractDateConverter<Timestamp>
Timestamp
.Constructor and Description |
---|
SqlTimestampConverter()
Construct.
|
SqlTimestampConverter(int dateFormat)
Construct.
|
SqlTimestampConverter(int dateFormat,
int timeFormat)
Construct.
|
Modifier and Type | Method and Description |
---|---|
protected Timestamp |
createDateLike(long date)
Creates a new instance of D out of the passed date(time) as long
|
DateFormat |
getDateFormat(Locale locale) |
protected Class<Timestamp> |
getTargetType() |
convertToObject, convertToString
newConversionException, parse
public 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 DateFormat getDateFormat(Locale locale)
getDateFormat
in class AbstractDateConverter<Timestamp>
protected Timestamp createDateLike(long date)
AbstractDateConverter
createDateLike
in class AbstractDateConverter<Timestamp>
date
- the date(time) in millis since Epochprotected Class<Timestamp> getTargetType()
getTargetType
in class AbstractConverter<Timestamp>
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.