Class 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 from Long to Date and back.
    Since:
    7.0
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateToLongConverter

        public DateToLongConverter()
        Deprecated.
    • 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 chaining Converter.convertToPresentation(Object, Class, Locale) and Converter.convertToModel(Object, Class, Locale) should return the original value.
        Specified by:
        convertToModel in interface Converter<java.util.Date,​java.lang.Long>
        Parameters:
        value - The value to convert, compatible with the target type. Can be null
        targetType - The requested type of the return value
        locale - 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 chaining Converter.convertToPresentation(Object, Class, Locale) and Converter.convertToModel(Object, Class, Locale) should return the original value.
        Specified by:
        convertToPresentation in interface Converter<java.util.Date,​java.lang.Long>
        Parameters:
        value - The value to convert, compatible with the target type. Can be null
        targetType - The requested type of the return value
        locale - The locale to use for conversion. Can be null.
        Returns:
        The converted value compatible with the source type