Class SqlTimestampConverter
- java.lang.Object
-
- org.apache.wicket.util.convert.converter.AbstractConverter<D>
-
- org.apache.wicket.util.convert.converter.AbstractDateConverter<java.sql.Timestamp>
-
- org.apache.wicket.util.convert.converter.SqlTimestampConverter
-
- All Implemented Interfaces:
java.io.Serializable,IConverter<java.sql.Timestamp>,IClusterable
public class SqlTimestampConverter extends AbstractDateConverter<java.sql.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 java.sql.TimestampcreateDateLike(long date)Creates a new instance of D out of the passed date(time) as longjava.text.DateFormatgetDateFormat(java.util.Locale locale)protected java.lang.Class<java.sql.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 java.text.DateFormat getDateFormat(java.util.Locale locale)
- Overrides:
getDateFormatin classAbstractDateConverter<java.sql.Timestamp>- Returns:
- Returns the date format.
-
createDateLike
protected java.sql.Timestamp createDateLike(long date)
Description copied from class:AbstractDateConverterCreates a new instance of D out of the passed date(time) as long- Specified by:
createDateLikein classAbstractDateConverter<java.sql.Timestamp>- Parameters:
date- the date(time) in millis since Epoch- Returns:
- a new instance of the specific type D
-
getTargetType
protected java.lang.Class<java.sql.Timestamp> getTargetType()
- Specified by:
getTargetTypein classAbstractConverter<java.sql.Timestamp>- Returns:
- The target type of this type converter
-
-