Class DatePropertyHandler

  • All Implemented Interfaces:
    PropertyHandler

    public class DatePropertyHandler
    extends java.lang.Object
    implements PropertyHandler
    PropertyHandler for date fields. Will convert Date, Time, and Timestamp from SQL types to java types.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object apply​(java.lang.Class<?> parameter, java.lang.Object value)
      Do the work required to store value into something of type parameter.
      boolean match​(java.lang.Class<?> parameter, java.lang.Object value)
      Test whether this PropertyHandler wants to handle setting value into something of type parameter.
      • Methods inherited from class java.lang.Object

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

      • DatePropertyHandler

        public DatePropertyHandler()
    • Method Detail

      • match

        public boolean match​(java.lang.Class<?> parameter,
                             java.lang.Object value)
        Description copied from interface: PropertyHandler
        Test whether this PropertyHandler wants to handle setting value into something of type parameter.
        Specified by:
        match in interface PropertyHandler
        Parameters:
        parameter - The type of the target parameter.
        value - The value to be set.
        Returns:
        true is this property handler can/wants to handle this value; false otherwise.
      • apply

        public java.lang.Object apply​(java.lang.Class<?> parameter,
                                      java.lang.Object value)
        Description copied from interface: PropertyHandler
        Do the work required to store value into something of type parameter. This method is called only if this handler responded true after a call to PropertyHandler.match(Class, Object).
        Specified by:
        apply in interface PropertyHandler
        Parameters:
        parameter - The type of the target parameter.
        value - The value to be set.
        Returns:
        The converted value or the original value if something doesn't work out.