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, EntityCollectionPart, EntityDiscriminatorMapping, EntityIdentifierMapping, EntityRowIdMapping, EntityVersionMapping, ForeignKeyDescriptor, NonAggregatedIdentifierMapping, OwnedValuedModelPart, PluralAttributeMapping, SingleAttributeIdentifierMapping, SingularAttributeMapping, ValuedModelPart
All Known Implementing Classes:
AbstractAttributeMapping, AbstractCompositeIdentifierMapping, AbstractDiscriminatorMapping, AbstractEntityCollectionPart, AbstractJdbcParameter, AbstractSingleColumnStandardBasicType, AbstractSingularAttributeMapping, AbstractStandardBasicType, AbstractStateArrayContributorMapping, AnonymousTupleBasicEntityIdentifierMapping, AnonymousTupleBasicValuedModelPart, AnonymousTupleEmbeddableValuedModelPart, AnonymousTupleEmbeddedEntityIdentifierMapping, AnonymousTupleEntityValuedModelPart, AnonymousTupleNonAggregatedEntityIdentifierMapping, AnyDiscriminatorPart, AnyKeyPart, BasicArrayType, BasicAttributeMapping, BasicCollectionType, BasicEntityIdentifierMappingImpl, BasicTypeImpl, BasicValuedCollectionPart, BottomType, CaseStatementDiscriminatorMappingImpl, CollectionIdentifierDescriptorImpl, ColumnValueParameter, ConvertedBasicArrayType, ConvertedBasicCollectionType, ConvertedBasicTypeImpl, CustomMutabilityConvertedBasicTypeImpl, CustomMutabilityConvertedPrimitiveBasicTypeImpl, CustomType, DiscriminatedAssociationAttributeMapping, DiscriminatedCollectionPart, DiscriminatorType, DiscriminatorTypeImpl, EmbeddableTypeLiteral, EmbeddedAttributeMapping, EmbeddedCollectionPart, EmbeddedForeignKeyDescriptor, EmbeddedIdentifierMappingImpl, EntityRowIdMappingImpl, EntityTypeLiteral, EntityVersionMappingImpl, ExplicitColumnDiscriminatorMappingImpl, ImmutableNamedBasicTypeImpl, InverseNonAggregatedIdentifierMapping, JavaObjectType, JdbcParameterImpl, ManyToManyCollectionPart, NamedBasicTypeImpl, NonAggregatedIdentifierMappingImpl, NullType, OneToManyCollectionPart, PluralAttributeMappingImpl, QueryParameterJavaObjectType, SerializableToBlobType, SerializableType, SimpleForeignKeyDescriptor, SimpleNaturalIdMapping, SqlTypedMappingJdbcParameter, StandardBasicTypeTemplate, ToOneAttributeMapping, VersionTypeSeedParameterSpecification, VirtualEmbeddedAttributeMapping

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.