Interface ValueMapping

All Superinterfaces:
Bindable, JavaTypedExpressible, JdbcMappingContainer, MappingModelExpressible
All Known Subinterfaces:
AdjustableBasicType<J>, AggregatedIdentifierMapping, AttributeMapping, BasicEntityIdentifierMapping, BasicPluralType<C,E>, BasicType<T>, BasicValuedMapping, BasicValuedModelPart, CollectionIdentifierDescriptor, CollectionPart, CompositeIdentifierMapping, ConvertedBasicType<J>, DiscriminatorMapping, DiscriminatorType<O>, EmbeddableDiscriminatorMapping, EmbeddableValuedFetchable, EmbeddableValuedModelPart, EntityDiscriminatorMapping, EntityIdentifierMapping, EntityRowIdMapping, EntityVersionMapping, ForeignKeyDescriptor, NonAggregatedIdentifierMapping, OwnedValuedModelPart, PluralAttributeMapping, org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping, SingularAttributeMapping, ValuedModelPart
All Known Implementing Classes:
org.hibernate.sql.exec.internal.AbstractJdbcParameter, AbstractSingleColumnStandardBasicType, AbstractStandardBasicType, BasicArrayType, BasicCollectionType, BottomType, ColumnValueParameter, ConvertedBasicArrayType, ConvertedBasicCollectionType, CustomType, DiscriminatorType, EmbeddableTypeLiteral, EntityTypeLiteral, JavaObjectType, NullType, QueryParameterJavaObjectType, SerializableType, StandardBasicTypeTemplate

public interface ValueMapping extends MappingModelExpressible, JavaTypedExpressible
Describes a mapping related to any part of the app's domain model, for example, an attribute, an entity identifier, collection elements, etc. Used during generation of a SQL AST.
  • Method Details

    • getMappedType

      MappingType getMappedType()
      Descriptor for the type of this mapping
    • getExpressibleJavaType

      default JavaType<?> getExpressibleJavaType()
      Specified by:
      getExpressibleJavaType in interface JavaTypedExpressible
    • treatAs

      default <X> X treatAs(Class<X> targetType)
      Treat operation. Asks the ValueMapping to treat itself as the given `targetType`, if it can.
      API Note:
      This is not necessarily limited to things the ValueMapping itself implements.
      Implementation Note:
      This default implementation is however limited to just things the ValueMapping itself implements.