Class JdbcTimeJavaType

    • Constructor Detail

      • JdbcTimeJavaType

        public JdbcTimeJavaType()
    • 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>
        areEqual in class AbstractClassJavaType<Date>
        one - One instance
        another - The other instance
        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.

        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​(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).
        context - Contextual information
        The recommended SQL type descriptor
      • getDefaultSqlPrecision

        public int getDefaultSqlPrecision​(Dialect dialect,
                                          JdbcType jdbcType)
        Description copied from interface: JavaType
        The default column precision when this Java type is mapped to a SQL data type which is parametrized by precision, for example Types.DECIMAL.
        Size.DEFAULT_PRECISION unless overridden