public class DateToSqlDateConverter extends Object implements Converter<Date,Date>
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
.Constructor and Description |
---|
DateToSqlDateConverter() |
Modifier and Type | Method and Description |
---|---|
Result<Date> |
convertToModel(Date value,
ValueContext context)
Converts the given value from model type to presentation type.
|
Date |
convertToPresentation(Date value,
ValueContext context)
Converts the given value from presentation type to model type.
|
public Result<Date> convertToModel(Date value, ValueContext context)
Converter
A converter can optionally use locale to do the conversion.
convertToModel
in interface Converter<Date,Date>
value
- The value to convert. Can be nullcontext
- The value context for the conversion.public Date convertToPresentation(Date value, ValueContext context)
Converter
A converter can optionally use locale to do the conversion.
convertToPresentation
in interface Converter<Date,Date>
value
- The value to convert. Can be nullcontext
- The value context for the conversion.Copyright © 2019. All rights reserved.