Module org.apache.wicket.util
Class AbstractDateConverter<D extends Date>
java.lang.Object
org.apache.wicket.util.convert.converter.AbstractConverter<D>
org.apache.wicket.util.convert.converter.AbstractDateConverter<D>
- Type Parameters:
D- the type of the Date that is supported by this converter
- All Implemented Interfaces:
Serializable,IConverter<D>,IClusterable
- Direct Known Subclasses:
DateConverter,SqlDateConverter,SqlTimeConverter,SqlTimestampConverter
A base class for all Date related converters
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToObject(String value, Locale locale) Converts the givenStringvalueconvertToString(D value, Locale locale) Converts the given value to a string.protected abstract DcreateDateLike(long date) Creates a new instance of D out of the passed date(time) as longgetDateFormat(Locale locale) Methods inherited from class org.apache.wicket.util.convert.converter.AbstractConverter
getTargetType, newConversionException, parse
-
Constructor Details
-
AbstractDateConverter
public AbstractDateConverter()
-
-
Method Details
-
createDateLike
Creates a new instance of D out of the passed date(time) as long- Parameters:
date- the date(time) in millis since Epoch- Returns:
- a new instance of the specific type D
-
convertToObject
Description copied from interface:IConverterConverts the givenStringvalue- Parameters:
value- The string value to convertlocale- The locale used to convert the value- Returns:
- The converted value
-
convertToString
Description copied from interface:IConverterConverts the given value to a string.- Specified by:
convertToStringin interfaceIConverter<D extends Date>- Overrides:
convertToStringin classAbstractConverter<D extends Date>- Parameters:
value- The value to convertlocale- The locale used to convert the value- Returns:
- The converted string value
- See Also:
-
getDateFormat
- Parameters:
locale-- Returns:
- Returns the date format.
-