Package org.hibernate.metamodel.mapping
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
public interface AttributeMapping extends OwnedValuedModelPart, Fetchable, DatabaseSnapshotContributor, PropertyBasedMapping, MutabilityPlanExposer
Describes an attribute at the mapping model level.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AttributeMappingasAttributeMapping()default EmbeddedAttributeMappingasEmbeddedAttributeMapping()A utility method to avoid casting explicitly to EmbeddedAttributeMappingdefault PluralAttributeMappingasPluralAttributeMapping()A utility method to avoid casting explicitly to PluralAttributeMappingdefault intcompare(Object value1, Object value2)default EntityMappingTypefindContainingEntityMapping()AttributeMetadatagetAttributeMetadata()Access to AttributeMetadataStringgetAttributeName()The name of the mapped attributeManagedMappingTypegetDeclaringType()The managed type that declares this attributedefault MutabilityPlan<?>getExposedMutabilityPlan()GeneratorgetGenerator()The value generation strategy to use for this attribute.default StringgetPartName()The local part name, which is generally the unqualified role namePropertyAccessgetPropertyAccess()The getter/setter access to this attributeintgetStateArrayPosition()The attribute's position within the container's state arraydefault ObjectgetValue(Object container)Convenient access to getting the value for this attribute from the declarerdefault booleanisEmbeddedAttributeMapping()default booleanisPluralAttributeMapping()default voidsetValue(Object container, Object value)Convenient access to setting the value for this attribute on the declarer-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.DatabaseSnapshotContributor
createSnapshotDomainResult
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getFetchableKey, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetch
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectable
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getJdbcTypeCount, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
-
-
-
-
Method Detail
-
getAttributeName
String getAttributeName()
The name of the mapped attribute
-
getPartName
default String getPartName()
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceModelPart
-
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:
getDeclaringTypein interfaceOwnedValuedModelPart
-
getPropertyAccess
PropertyAccess getPropertyAccess()
The getter/setter access to this attribute- Specified by:
getPropertyAccessin interfacePropertyBasedMapping
-
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:
findContainingEntityMappingin interfaceModelPart
-
getExposedMutabilityPlan
default MutabilityPlan<?> getExposedMutabilityPlan()
- Specified by:
getExposedMutabilityPlanin interfaceMutabilityPlanExposer
-
asAttributeMapping
default AttributeMapping asAttributeMapping()
- Specified by:
asAttributeMappingin interfaceFetchable- Specified by:
asAttributeMappingin interfaceModelPart
-
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()
-
-