Class DateConverter.SQL

All Implemented Interfaces:
Serializable, Function<Date,Date>, ObjectConverter<Date,Date>
Enclosing class:
DateConverter<T>

public static final class DateConverter.SQL extends DateConverter<Date>
From Date to SQL Date. The inverse of this converter is the identity conversion.
See Also:
  • Field Details

  • Constructor Details

    • SQL

      public SQL()
  • Method Details

    • apply

      public Date apply(Date source)
      Description copied from interface: ObjectConverter
      Converts the given object from the source type S to the target type T. If the given object cannot be converted, then this method may either returns null or throws an exception, at implementation choice (except for injective functions, which must throw an exception - see the class Javadoc for more discussion about function properties).
      Example: in Apache SIS implementation, converters from String to Number distinguish two kinds of unconvertible objects:
      • Null or empty source string result in a null value to be returned.
      • All other kind of unparsable strings results in an exception to be thrown.
      In other words, the "" value is unconvertible but nevertheless considered as part of the converter domain, and is mapped to "no number". All other unparsable strings are considered outside the converter domain.
      Parameters:
      source - the object to convert, or null.
      Returns:
      the converted object, or null.