Top Description Methods
org.hibernate.metamodel.mapping

public Interface JdbcMapping

extends MappingType, JdbcMappingContainer
Known Direct Subinterfaces
org.hibernate.type.BasicType
Known Direct Implementers
org.hibernate.metamodel.model.domain.internal.BasicTypeImpl
Imports
org.hibernate.Incubating, org.hibernate.internal.util.IndexedConsumer, org.hibernate.query.sqm.CastType, org.hibernate.type.descriptor.ValueBinder, .ValueExtractor, org.hibernate.type.descriptor.converter.spi.BasicValueConverter, org.hibernate.type.descriptor.java.JavaType, org.hibernate.type.descriptor.jdbc.JdbcLiteralFormatter, .JdbcType

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

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default Object
public default Object
public default int
public default int
forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)

Implements org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Visit each JdbcMapping starting from the given offset
public default CastType
public JavaType<T>
getJavaTypeDescriptor()

The descriptor for the Java type represented by this expressible type

public default JavaType<?>
public default JdbcLiteralFormatter<T>
getJdbcLiteralFormatter()

The strategy for formatting values of this expressible type to a SQL literal.

public default JdbcMapping
public JdbcType
getJdbcType()

The descriptor for the SQL type represented by this expressible type

public default int
public ValueBinder<X>
getJdbcValueBinder()

The strategy for binding values of this expressible type to JDBC PreparedStatements and CallableStatements.

public ValueExtractor<?>
getJdbcValueExtractor()

The strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etc

public default JavaType<?>
public default JdbcMapping
public default BasicValueConverter<D, R>
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.

Method Detail

convertToDomainValueback to summary
public default Object convertToDomainValue(Object value)
convertToRelationalValueback to summary
public default Object convertToRelationalValue(Object value)
Annotations
@SuppressWarnings:rawtypes, unchecked
forEachJdbcTypeback to summary
public default int forEachJdbcType(IndexedConsumer<JdbcMapping> action)

Overrides default org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Doc from org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Visit each of JdbcMapping

Annotations
@Override
forEachJdbcTypeback to summary
public default int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)

Implements org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Doc from org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Visit each JdbcMapping starting from the given offset

Annotations
@Override
getCastTypeback to summary
public default CastType getCastType()
getJavaTypeDescriptorback to summary
public JavaType<T> getJavaTypeDescriptor()

The descriptor for the Java type represented by this expressible type

getJdbcJavaTypeback to summary
public default JavaType<?> getJdbcJavaType()
Annotations
@Incubating
getJdbcLiteralFormatterback to summary
public default JdbcLiteralFormatter<T> getJdbcLiteralFormatter()

The strategy for formatting values of this expressible type to a SQL literal.

Annotations
@Incubating
getJdbcMappingback to summary
public default JdbcMapping getJdbcMapping(int index)

Implements org.hibernate.metamodel.mapping.JdbcMappingContainer.getJdbcMapping.

Annotations
@Override
getJdbcTypeback to summary
public JdbcType getJdbcType()

The descriptor for the SQL type represented by this expressible type

getJdbcTypeCountback to summary
public default int getJdbcTypeCount()

Overrides default org.hibernate.metamodel.mapping.JdbcMappingContainer.getJdbcTypeCount.

Doc from org.hibernate.metamodel.mapping.JdbcMappingContainer.getJdbcTypeCount.

The number of JDBC mappings

Annotations
@Override
getJdbcValueBinderback to summary
public ValueBinder<X> getJdbcValueBinder()

The strategy for binding values of this expressible type to JDBC PreparedStatements and CallableStatements.

getJdbcValueExtractorback to summary
public ValueExtractor<?> getJdbcValueExtractor()

The strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etc

getMappedJavaTypeback to summary
public default JavaType<?> getMappedJavaType()

Implements org.hibernate.metamodel.mapping.MappingType.getMappedJavaType.

Doc from org.hibernate.metamodel.mapping.MappingType.getMappedJavaType.

The descriptor descriptor for the mapped Java type

Annotations
@Override
getSingleJdbcMappingback to summary
public default JdbcMapping getSingleJdbcMapping()

Overrides default org.hibernate.metamodel.mapping.JdbcMappingContainer.getSingleJdbcMapping.

Annotations
@Override
getValueConverterback to summary
public default BasicValueConverter<D, R> 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.

Annotations
@Incubating