Class DateToLongConverter
- java.lang.Object
-
- com.vaadin.v7.data.util.converter.DateToLongConverter
-
- All Implemented Interfaces:
Converter<java.util.Date,java.lang.Long>
,java.io.Serializable
@Deprecated public class DateToLongConverter extends java.lang.Object implements Converter<java.util.Date,java.lang.Long>
Deprecated.A converter that converts fromLong
toDate
and back.- Since:
- 7.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.util.converter.Converter
Converter.ConversionException
-
-
Constructor Summary
Constructors Constructor Description DateToLongConverter()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Long
convertToModel(java.util.Date value, java.lang.Class<? extends java.lang.Long> targetType, java.util.Locale locale)
Deprecated.Converts the given value from target type to source type.java.util.Date
convertToPresentation(java.lang.Long value, java.lang.Class<? extends java.util.Date> targetType, java.util.Locale locale)
Deprecated.Converts the given value from source type to target type.java.lang.Class<java.lang.Long>
getModelType()
Deprecated.The source type of the converter.java.lang.Class<java.util.Date>
getPresentationType()
Deprecated.The target type of the converter.
-
-
-
Method Detail
-
convertToModel
public java.lang.Long convertToModel(java.util.Date value, java.lang.Class<? extends java.lang.Long> targetType, java.util.Locale locale)
Deprecated.Description copied from interface:Converter
Converts the given value from target type to source type.A converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Class, Locale)
andConverter.convertToModel(Object, Class, Locale)
should return the original value.- Specified by:
convertToModel
in interfaceConverter<java.util.Date,java.lang.Long>
- Parameters:
value
- The value to convert, compatible with the target type. Can be nulltargetType
- The requested type of the return valuelocale
- The locale to use for conversion. Can be null.- Returns:
- The converted value compatible with the source type
-
convertToPresentation
public java.util.Date convertToPresentation(java.lang.Long value, java.lang.Class<? extends java.util.Date> targetType, java.util.Locale locale)
Deprecated.Description copied from interface:Converter
Converts the given value from source type to target type.A converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Class, Locale)
andConverter.convertToModel(Object, Class, Locale)
should return the original value.- Specified by:
convertToPresentation
in interfaceConverter<java.util.Date,java.lang.Long>
- Parameters:
value
- The value to convert, compatible with the target type. Can be nulltargetType
- The requested type of the return valuelocale
- The locale to use for conversion. Can be null.- Returns:
- The converted value compatible with the source type
-
getModelType
public java.lang.Class<java.lang.Long> getModelType()
Deprecated.Description copied from interface:Converter
The source type of the converter. Values of this type can be passed toConverter.convertToPresentation(Object, Class, Locale)
.- Specified by:
getModelType
in interfaceConverter<java.util.Date,java.lang.Long>
- Returns:
- The source type
-
getPresentationType
public java.lang.Class<java.util.Date> getPresentationType()
Deprecated.Description copied from interface:Converter
The target type of the converter. Values of this type can be passed toConverter.convertToModel(Object, Class, Locale)
.- Specified by:
getPresentationType
in interfaceConverter<java.util.Date,java.lang.Long>
- Returns:
- The target type
-
-