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 enum
The 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 Object
getIdentifier
(Object entity, MergeContext mergeContext) Extract the identifier from an instance of the entity It's supposed to be use during the merging processdefault Object
getIdentifierIfNotUnsaved
(Object entity, SharedSessionContractImplementor session) Return the identifier of the persistent or transient object, or throw an exception if the instance is "unsaved"default String
The 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 boolean
static boolean
matchesRoleName
(String name) void
setIdentifier
(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, forEachJdbcValue
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, 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, findContainingEntityMapping, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, 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
-
Field Details
-
ID_ROLE_NAME
- See Also:
-
LEGACY_ID_NAME
- See Also:
-
-
Method Details
-
matchesRoleName
-
getPartName
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in 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 -
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 It's supposed to be use during the merging process -
isEntityIdentifierMapping
default boolean isEntityIdentifierMapping()- Specified by:
isEntityIdentifierMapping
in interfaceModelPart
-