Class SqlTimestampConverter
- java.lang.Object
-
- org.apache.wicket.util.convert.converter.AbstractConverter<D>
-
- org.apache.wicket.util.convert.converter.AbstractDateConverter<Timestamp>
-
- org.apache.wicket.util.convert.converter.SqlTimestampConverter
-
- All Implemented Interfaces:
Serializable
,IConverter<Timestamp>
,IClusterable
public class SqlTimestampConverter extends AbstractDateConverter<Timestamp>
Converts toTimestamp
.- Author:
- eelcohillenius
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SqlTimestampConverter()
Construct.SqlTimestampConverter(int dateFormat)
Construct.SqlTimestampConverter(int dateFormat, int timeFormat)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Timestamp
createDateLike(long date)
Creates a new instance of D out of the passed date(time) as longDateFormat
getDateFormat(Locale locale)
protected Class<Timestamp>
getTargetType()
-
Methods inherited from class org.apache.wicket.util.convert.converter.AbstractDateConverter
convertToObject, convertToString
-
Methods inherited from class org.apache.wicket.util.convert.converter.AbstractConverter
newConversionException, parse
-
-
-
-
Constructor Detail
-
SqlTimestampConverter
public SqlTimestampConverter()
Construct.
-
SqlTimestampConverter
public SqlTimestampConverter(int dateFormat)
Construct.- Parameters:
dateFormat
- See java.text.DateFormat for details. Defaults to DateFormat.SHORT
-
SqlTimestampConverter
public SqlTimestampConverter(int dateFormat, int timeFormat)
Construct.- Parameters:
dateFormat
- See java.text.DateFormat for details. Defaults to DateFormat.SHORT * @param timeFormat See java.text.DateFormat for details. Defaults to DateFormat.SHORTtimeFormat
-
-
-
Method Detail
-
getDateFormat
public DateFormat getDateFormat(Locale locale)
- Overrides:
getDateFormat
in classAbstractDateConverter<Timestamp>
- Returns:
- Returns the date format.
-
createDateLike
protected Timestamp createDateLike(long date)
Description copied from class:AbstractDateConverter
Creates a new instance of D out of the passed date(time) as long- Specified by:
createDateLike
in classAbstractDateConverter<Timestamp>
- Parameters:
date
- the date(time) in millis since Epoch- Returns:
- a new instance of the specific type D
-
getTargetType
protected Class<Timestamp> getTargetType()
- Specified by:
getTargetType
in classAbstractConverter<Timestamp>
- Returns:
- The target type of this type converter
-
-