Interface JdbcMapping

All Superinterfaces:
JdbcMappingContainer, MappingType
All Known Subinterfaces:
AdjustableBasicType<J>, BasicPluralType<C,E>, BasicType<T>, ConvertedBasicType<J>, DiscriminatorType<O>
All Known Implementing Classes:
AbstractSingleColumnStandardBasicType, AbstractStandardBasicType, BasicArrayType, BasicCollectionType, BottomType, ConvertedBasicArrayType, ConvertedBasicCollectionType, CustomType, DiscriminatorType, JavaObjectType, NullType, QueryParameterJavaObjectType, SerializableType, StandardBasicTypeTemplate

public interface JdbcMapping extends MappingType, JdbcMappingContainer
Describes the mapping for things which can be expressed in a SQL query.

Generally speaking this models a column. However, it can also model SQL tuples as well

This includes details such as

Some mappings will have an associated value converter. The readers and writers for such mappings will already incorporate those conversions

Some mappings support usage as SQL literals. Such mappings will return a non-null literal formatter which handles formatting values as a SQL literal

  • Method Details

    • getJavaTypeDescriptor

      JavaType<?> getJavaTypeDescriptor()
      The descriptor for the Java type represented by this expressible type
    • getJdbcType

      JdbcType getJdbcType()
      The descriptor for the SQL type represented by this expressible type
    • getJdbcValueExtractor

      ValueExtractor<?> getJdbcValueExtractor()
      The strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etc
    • getJdbcValueBinder

      ValueBinder getJdbcValueBinder()
      The strategy for binding values of this expressible type to JDBC PreparedStatements and CallableStatements.
    • getCastType

      default CastType getCastType()
    • getJdbcLiteralFormatter

      @Incubating default JdbcLiteralFormatter getJdbcLiteralFormatter()
      The strategy for formatting values of this expressible type to a SQL literal.
    • getMappedJavaType

      default JavaType<?> getMappedJavaType()
      Description copied from interface: MappingType
      The descriptor descriptor for the mapped Java type
      Specified by:
      getMappedJavaType in interface MappingType
    • getJdbcJavaType

      @Incubating default JavaType<?> getJdbcJavaType()
    • getValueConverter

      @Incubating default BasicValueConverter<?,?> getValueConverter()
      Returns the converter that this basic type uses for transforming from the domain type, to the relational type, or null if there is no conversion.
    • convertToRelationalValue

      default <T> Object convertToRelationalValue(T value)
    • convertToDomainValue

      default <T> Object convertToDomainValue(T value)
    • getJdbcTypeCount

      default int getJdbcTypeCount()
      Description copied from interface: JdbcMappingContainer
      The number of JDBC mappings
      Specified by:
      getJdbcTypeCount in interface JdbcMappingContainer
    • getJdbcMapping

      default JdbcMapping getJdbcMapping(int index)
      Specified by:
      getJdbcMapping in interface JdbcMappingContainer
    • getSingleJdbcMapping

      default JdbcMapping getSingleJdbcMapping()
      Specified by:
      getSingleJdbcMapping in interface JdbcMappingContainer
    • forEachJdbcType

      default int forEachJdbcType(org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action)
      Description copied from interface: JdbcMappingContainer
      Visit each of JdbcMapping
      Specified by:
      forEachJdbcType in interface JdbcMappingContainer
    • forEachJdbcType

      default int forEachJdbcType(int offset, org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action)
      Description copied from interface: JdbcMappingContainer
      Visit each JdbcMapping starting from the given offset
      Specified by:
      forEachJdbcType in interface JdbcMappingContainer