Interface AttributeMapping

All Superinterfaces:
Bindable, DatabaseSnapshotContributor, Fetchable, JavaTypedExpressible, JdbcMappingContainer, MappingModelExpressible, ModelPart, MutabilityPlanExposer, OwnedValuedModelPart, PropertyBasedMapping, SelectableMappings, ValuedModelPart, ValueMapping
All Known Subinterfaces:
AggregatedIdentifierMapping, BasicEntityIdentifierMapping, PluralAttributeMapping, SingleAttributeIdentifierMapping, SingularAttributeMapping
All Known Implementing Classes:
AbstractAttributeMapping, AbstractSingularAttributeMapping, AbstractStateArrayContributorMapping, AnonymousTupleBasicEntityIdentifierMapping, AnonymousTupleEmbeddedEntityIdentifierMapping, BasicAttributeMapping, BasicEntityIdentifierMappingImpl, DiscriminatedAssociationAttributeMapping, EmbeddedAttributeMapping, EmbeddedIdentifierMappingImpl, InverseNonAggregatedIdentifierMapping, PluralAttributeMappingImpl, ToOneAttributeMapping, VirtualEmbeddedAttributeMapping

Describes an attribute at the mapping model level.
  • Method Details

    • getAttributeName

      String getAttributeName()
      The name of the mapped attribute
    • getPartName

      default String getPartName()
      Description copied from interface: ModelPart
      The local part name, which is generally the unqualified role name
      Specified by:
      getPartName in interface ModelPart
    • getStateArrayPosition

      int getStateArrayPosition()
      The attribute's position within the container's state array
    • getAttributeMetadata

      AttributeMetadata getAttributeMetadata()
      Access to AttributeMetadata
    • getDeclaringType

      ManagedMappingType getDeclaringType()
      The managed type that declares this attribute
      Specified by:
      getDeclaringType in interface OwnedValuedModelPart
    • getPropertyAccess

      PropertyAccess getPropertyAccess()
      The getter/setter access to this attribute
      Specified by:
      getPropertyAccess in interface PropertyBasedMapping
    • getValue

      default Object getValue(Object container)
      Convenient access to getting the value for this attribute from the declarer
    • setValue

      default void setValue(Object container, Object value)
      Convenient access to setting the value for this attribute on the declarer
    • getGenerator

      Generator getGenerator()
      The value generation strategy to use for this attribute.
      API Note:
      Only relevant for non-id attributes
    • findContainingEntityMapping

      default EntityMappingType findContainingEntityMapping()
      Specified by:
      findContainingEntityMapping in interface ModelPart
    • getExposedMutabilityPlan

      default MutabilityPlan<?> getExposedMutabilityPlan()
      Specified by:
      getExposedMutabilityPlan in interface MutabilityPlanExposer
    • compare

      default int compare(Object value1, Object value2)
    • asAttributeMapping

      default AttributeMapping asAttributeMapping()
      Specified by:
      asAttributeMapping in interface Fetchable
      Specified by:
      asAttributeMapping in interface ModelPart
    • asPluralAttributeMapping

      default PluralAttributeMapping asPluralAttributeMapping()
      A utility method to avoid casting explicitly to PluralAttributeMapping
      Returns:
      PluralAttributeMapping if this is an instance of PluralAttributeMapping otherwise null
    • isPluralAttributeMapping

      default boolean isPluralAttributeMapping()
    • asEmbeddedAttributeMapping

      default EmbeddedAttributeMapping asEmbeddedAttributeMapping()
      A utility method to avoid casting explicitly to EmbeddedAttributeMapping
      Returns:
      EmbeddedAttributeMapping if this is an instance of EmbeddedAttributeMapping otherwise null
    • isEmbeddedAttributeMapping

      default boolean isEmbeddedAttributeMapping()