Class JdbcDateJavaType

    • Constructor Detail

      • JdbcDateJavaType

        public JdbcDateJavaType()
    • Method Detail

      • getPrecision

        public jakarta.persistence.TemporalType getPrecision()
        Description copied from interface: TemporalJavaType
        The precision represented by this type
      • isInstance

        public boolean isInstance​(Object value)
        Description copied from interface: JavaType
        Is the given value an instance of the described type? Generally this comes down to getJavaTypeClass().isInstance(), though some descriptors (mainly the java.sql.Date, Time and Timestamp descriptors) might need different semantics
      • areEqual

        public boolean areEqual​(Date one,
                                Date another)
        Description copied from interface: JavaType
        Determine if two instances are equal
        Specified by:
        areEqual in interface JavaType<Date>
        Overrides:
        areEqual in class AbstractClassJavaType<Date>
        Parameters:
        one - One instance
        another - The other instance
        Returns:
        True if the two are considered equal; false otherwise.
      • unwrap

        public Object unwrap​(Date value,
                             Class type,
                             WrapperOptions options)
        Description copied from interface: JavaType
        Unwrap an instance of our handled Java type into the requested type.

        As an example, if this is a JavaType<Integer> and we are asked to unwrap the Integer value as a Long we would return something like Long.valueOf( value.longValue() ).

        Intended use is during PreparedStatement binding.

        Parameters:
        value - The value to unwrap
        type - The type as which to unwrap
        options - The options
        Returns:
        The unwrapped value.
      • wrap

        public Date wrap​(Object value,
                         WrapperOptions options)
        Description copied from interface: JavaType
        Wrap a value as our handled Java type.

        Intended use is during ResultSet extraction.

        Parameters:
        value - The value to wrap.
        options - The options
        Returns:
        The wrapped value.
      • toString

        public String toString​(Date value)
      • getRecommendedJdbcType

        public JdbcType getRecommendedJdbcType​(JdbcTypeIndicators context)
        Description copied from interface: BasicJavaType
        Obtain the "recommended" SQL type descriptor for this Java type. The recommended aspect comes from the JDBC spec (mostly).
        Parameters:
        context - Contextual information
        Returns:
        The recommended SQL type descriptor