Class JdbcDateJavaTypeDescriptor

    • Constructor Detail

      • JdbcDateJavaTypeDescriptor

        public JdbcDateJavaTypeDescriptor()
    • Method Detail

      • getPrecision

        public jakarta.persistence.TemporalType getPrecision()
        Description copied from interface: TemporalJavaTypeDescriptor
        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
      • 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 JavaTypeDescriptor<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.

        value - The value to unwrap
        type - The type as which to unwrap
        options - The options
        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.

        value - The value to wrap.
        options - The options
        The wrapped value.
      • toString

        public String toString​(Date value)
      • getRecommendedJdbcType

        public JdbcType getRecommendedJdbcType​(JdbcTypeDescriptorIndicators 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).
        context - Contextual information
        The recommended SQL type descriptor