Package org.hibernate.metamodel.mapping
Interface EntityIdentifierMapping
- All Superinterfaces:
Bindable,Fetchable,JavaTypedExpressible,JdbcMappingContainer,MappingModelExpressible,ModelPart,SelectableMappings,ValuedModelPart,ValueMapping
- All Known Subinterfaces:
AggregatedIdentifierMapping,BasicEntityIdentifierMapping,CompositeIdentifierMapping,NonAggregatedIdentifierMapping,SingleAttributeIdentifierMapping
- All Known Implementing Classes:
AbstractCompositeIdentifierMapping,AnonymousTupleBasicEntityIdentifierMapping,AnonymousTupleEmbeddedEntityIdentifierMapping,AnonymousTupleNonAggregatedEntityIdentifierMapping,BasicEntityIdentifierMappingImpl,EmbeddedIdentifierMappingImpl,InverseNonAggregatedIdentifierMapping,NonAggregatedIdentifierMappingImpl
Describes the mapping of an entity's identifier.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe style of identifier used.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 -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe name of the attribute defining the id, if onegetIdentifier(Object entity) Extract the identifier from an instance of the entitydefault ObjectgetIdentifier(Object entity, MergeContext mergeContext) Extract the identifier from an instance of the entitydefault ObjectgetIdentifierIfNotUnsaved(Object entity, SharedSessionContractImplementor session) Return the identifier of the persistent or transient object, or throw an exception if the instance is "unsaved"default StringThe local part name, which is generally the unqualified role nameThe strategy for distinguishing between detached and transient state based on the identifier mappingInstantiate an instance of the identifier.default booleanstatic booleanmatchesRoleName(String name) voidsetIdentifier(Object entity, Object id, SharedSessionContractImplementor session) Inject an identifier value into an instance of the entityMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, generateFetch, getFetchableKey, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKeyMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectableMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
-
Field Details
-
ID_ROLE_NAME
- See Also:
-
LEGACY_ID_NAME
- See Also:
-
-
Method Details
-
matchesRoleName
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceModelPart
-
getNature
EntityIdentifierMapping.Nature getNature()- See Also:
-
getAttributeName
String getAttributeName()The name of the attribute defining the id, if one -
getUnsavedStrategy
IdentifierValue getUnsavedStrategy()The strategy for distinguishing between detached and transient state based on the identifier mapping- See Also:
-
instantiate
Object instantiate()Instantiate an instance of the identifier.- API Note:
- This is really only valid on composite identifiers
-
getIdentifier
Extract the identifier from an instance of the entity -
getIdentifier
Extract the identifier from an instance of the entity- API Note:
- Intended for use during the merging process
-
isEntityIdentifierMapping
default boolean isEntityIdentifierMapping()- Specified by:
isEntityIdentifierMappingin interfaceModelPart
-