com.vaadin.data.converter.
Class DateToLongConverter
- java.lang.Object
-
- com.vaadin.data.converter.DateToLongConverter
-
-
Constructor Summary
Constructors Constructor Description DateToLongConverter()
-
Method Summary
All Methods Modifier and Type Method Description Result<Long>
convertToModel(Date value, ValueContext context)
Converts the given value from model type to presentation type.
Date
convertToPresentation(Long value, ValueContext context)
Converts the given value from presentation type to model type.
-
-
-
Method Detail
-
convertToModel
public Result<Long> convertToModel(Date value, ValueContext context)
Description copied from interface:
Converter
Converts the given value from model type to presentation type.
A converter can optionally use locale to do the conversion.
Specified by:
convertToModel
in interfaceConverter<Date,Long>
Parameters:
value
- The value to convert. Can be nullcontext
- The value context for the conversion.Returns:
The converted value compatible with the source type
-
convertToPresentation
public Date convertToPresentation(Long value, ValueContext context)
Description copied from interface:
Converter
Converts the given value from presentation type to model type.
A converter can optionally use locale to do the conversion.
Specified by:
convertToPresentation
in interfaceConverter<Date,Long>
Parameters:
value
- The value to convert. Can be nullcontext
- The value context for the conversion.Returns:
The converted value compatible with the source type
-
-