Interface JdbcTypeIndicators

    • Method Detail

      • isNationalized

        default boolean isNationalized()
        Was nationalized character datatype requested for the given Java type?
        Returns:
        true if nationalized character datatype should be used; false otherwise.
      • isLob

        default boolean isLob()
        Was LOB datatype requested for the given Java type?
        Returns:
        true if LOB datatype should be used; false otherwise.
      • getEnumeratedType

        default jakarta.persistence.EnumType getEnumeratedType()
        For enum mappings, what style of storage was requested (name vs. ordinal)?
        Returns:
        The enum type.
      • getTemporalPrecision

        default jakarta.persistence.TemporalType getTemporalPrecision()
        For temporal type mappings, what precision was requested?
      • getPreferredSqlTypeCodeForArray

        default int getPreferredSqlTypeCodeForArray()
        When mapping a basic array or collection type to the database what is the preferred SQL type code to use?

        Returns a key into the JdbcTypeRegistry.

        Since:
        6.1
        See Also:
        Dialect.getPreferredSqlTypeCodeForArray()
      • getColumnLength

        default long getColumnLength()
        Useful for resolutions based on column length.

        E.g. for choosing between a VARCHAR (String) and CHAR(1) (Character/char).

      • getColumnPrecision

        default int getColumnPrecision()
        Useful for resolutions based on column precision.
      • getColumnScale

        default int getColumnScale()
        Useful for resolutions based on column scale.

        E.g. for choosing between a NUMERIC and INTERVAL SECOND.

      • getJdbcType

        default JdbcType getJdbcType​(int jdbcTypeCode)
        The JdbcType registered under the given type code with the associated JdbcTypeRegistry.
        Parameters:
        jdbcTypeCode - a type code from SqlTypes
        Returns:
        the JdbcType registered under that type code
      • resolveJdbcTypeCode

        default int resolveJdbcTypeCode​(int jdbcTypeCode)
        Resolves the given type code to a possibly different type code, based on context. A database might not support a certain type code in certain scenarios like within a UDT and has to resolve to a different type code in such a scenario.
        Parameters:
        jdbcTypeCode - a type code from SqlTypes
        Returns:
        The jdbc type code to use