Package com.vaadin.flow.data.converter
Class DateToSqlDateConverter
java.lang.Object
com.vaadin.flow.data.converter.DateToSqlDateConverter
- All Implemented Interfaces:
Converter<Date,
,Date> Serializable
Converter for handling conversion between
Date
and
Date
. This is used when a PopupDateField or InlineDateField
is connected to a java.sql.Date property. Note that information (time
information) is lost when converting from Date
to
Date
.- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToModel
(Date value, ValueContext context) Converts the given value from presentation type to model type.convertToPresentation
(Date value, ValueContext context) Converts the given value from model type to presentation type.
-
Constructor Details
-
DateToSqlDateConverter
public DateToSqlDateConverter()
-
-
Method Details
-
convertToModel
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:
convertToModel
in interfaceConverter<Date,
Date> - 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
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:
convertToPresentation
in interfaceConverter<Date,
Date> - Parameters:
value
- The value to convert. Can be nullcontext
- The value context for the conversion.- Returns:
- The converted value compatible with the source type
-