Interface JdbcType

    • Method Detail

      • getFriendlyName

        default String getFriendlyName()
        A "friendly" name for use in logging
      • getDefaultSqlTypeCode

        default int getDefaultSqlTypeCode()
        A JDBC type code that identifies the SQL column type.

        This value might be different from #getDdlTypeCode() if the actual type e.g. JSON is emulated through a type like CLOB.

        Returns:
        a JDBC type code
      • getJdbcLiteralFormatter

        default <T> JdbcLiteralFormatter<T> getJdbcLiteralFormatter​(JavaType<T> javaType)
        Obtain a formatter object capable of rendering values of the given Java type as SQL literals of the type represented by this object.
      • getBinder

        <X> ValueBinder<X> getBinder​(JavaType<X> javaType)
        Obtain a binder object capable of binding values of the given Java type to parameters of a JDBC PreparedStatement.
        Parameters:
        javaType - The descriptor describing the types of Java values to be bound
        Returns:
        The appropriate binder.
      • getExtractor

        <X> ValueExtractor<X> getExtractor​(JavaType<X> javaType)
        Obtain an extractor object capable of extracting values of the given Java type from a JDBC ResultSet.
        Parameters:
        javaType - The descriptor describing the types of Java values to be extracted
        Returns:
        The appropriate extractor
      • getPreferredJavaTypeClass

        default Class<?> getPreferredJavaTypeClass​(WrapperOptions options)
        The Java type class that is preferred by the binder or null.
      • isInteger

        default boolean isInteger()
      • isInteger

        static boolean isInteger​(int typeCode)
      • isFloat

        default boolean isFloat()
      • isFloat

        static boolean isFloat​(int typeCode)
      • isDecimal

        default boolean isDecimal()
      • isDecimal

        static boolean isDecimal​(int typeCode)
      • isNumber

        default boolean isNumber()
      • isNumber

        static boolean isNumber​(int typeCode)
      • isBinary

        default boolean isBinary()
      • isBinary

        static boolean isBinary​(int typeCode)
      • isString

        default boolean isString()
      • isString

        static boolean isString​(int typeCode)
      • isTemporal

        default boolean isTemporal()
      • isTemporal

        static boolean isTemporal​(int typeCode)
      • isInterval

        default boolean isInterval()
      • isInterval

        static boolean isInterval​(int typeCode)
      • getCastType

        default CastType getCastType()
      • getCastType

        static CastType getCastType​(int typeCode)