Interface NonAggregatedIdentifierMapping
- All Superinterfaces:
Bindable, CompositeIdentifierMapping, EmbeddableValuedFetchable, EmbeddableValuedModelPart, EntityIdentifierMapping, Fetchable, FetchableContainer, FetchOptions, FetchStyleAccess, FetchTimingAccess, JavaTypedExpressible, JdbcMappingContainer, MappingModelExpressible, ModelPart, ModelPartContainer, SelectableMappings, TableGroupJoinProducer, TableGroupProducer, ValuedModelPart, ValueMapping, VirtualModelPart
public interface NonAggregatedIdentifierMapping
extends CompositeIdentifierMapping, EmbeddableValuedFetchable, FetchOptions, VirtualModelPart
A "non-aggregated" composite identifier, which means that the entity itself
does not define a singular representation of its identifier like an
aggregated mapping does.
An IdClass can be used to provide a simple, singular representation of the
identifier for easier reference in API calls. JPA requires using an IdClass
when mapping such identifiers. Hibernate supports mapping such identifiers
with or without the IdClass; without, the entity itself is used as the
identifier.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThink of an AttributeConverter for id values to account for representation difference between virtual and id-class mappingsNested classes/interfaces inherited from interface Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface EntityIdentifierMapping
EntityIdentifierMapping.NatureNested classes/interfaces inherited from interface ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Field Summary
Fields inherited from interface EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME -
Method Summary
Modifier and TypeMethodDescriptiondefault intThe key that identifies this Fetchable within aFetchableContainer.org.hibernate.metamodel.mapping.internal.IdClassEmbeddableThe id-class representation of this id mappingThe id-class, if there is one, otherwise the virtual-id.org.hibernate.metamodel.mapping.internal.VirtualIdEmbeddableThe virtual-id representation of this id mappingMethods inherited from interface Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface CompositeIdentifierMapping
getMappedIdEmbeddableTypeDescriptor, getPartMappingType, getUnsavedStrategy, hasContainingClassMethods inherited from interface EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicateMethods inherited from interface EmbeddableValuedModelPart
addToCacheKey, breakDownJdbcValues, decompose, disassemble, findSubPart, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachJdbcValue, forEachSelectable, forEachSubPart, forEachUpdatable, getEmbeddableTypeDescriptor, getFetchable, getJavaType, getJdbcMapping, getJdbcTypeCount, getMappedType, getNumberOfFetchables, getParentInjectionAttributePropertyAccess, getSelectable, getSelectableIndex, hasPartitionedSelectionMapping, toSqlExpression, visitSubPartsMethods inherited from interface EntityIdentifierMapping
getAttributeName, getIdentifier, getIdentifier, getIdentifierIfNotUnsaved, getNature, getPartName, instantiate, isEntityIdentifierMapping, setIdentifierMethods inherited from interface Fetchable
asAttributeMapping, generateFetch, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface FetchStyleAccess
getStyleMethods inherited from interface FetchTimingAccess
getTimingMethods inherited from interface JavaTypedExpressible
addToCacheKeyMethods inherited from interface ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, createDomainResult, decompose, findContainingEntityMapping, getNavigableRoleMethods inherited from interface ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinTypeMethods inherited from interface TableGroupProducer
containsTableReference, getSqlAliasStemMethods inherited from interface ValuedModelPart
forEachNonFormula, forEachSelectable, getContainingTableExpression, getSingleJdbcMappingMethods inherited from interface ValueMapping
getExpressibleJavaType, treatAsMethods inherited from interface VirtualModelPart
isVirtual
-
Method Details
-
getVirtualIdEmbeddable
org.hibernate.metamodel.mapping.internal.VirtualIdEmbeddable getVirtualIdEmbeddable()The virtual-id representation of this id mapping -
getIdClassEmbeddable
org.hibernate.metamodel.mapping.internal.IdClassEmbeddable getIdClassEmbeddable()The id-class representation of this id mapping -
getIdentifierValueMapper
NonAggregatedIdentifierMapping.IdentifierValueMapper getIdentifierValueMapper()The id-class, if there is one, otherwise the virtual-id. -
getFetchableKey
default int getFetchableKey()Description copied from interface:FetchableThe key that identifies this Fetchable within aFetchableContainer. If this Fetchable is part ofFetchableContainer.visitFetchables(IndexedConsumer, EntityMappingType), the values is guaranteed to be between 0 (inclusive) andFetchableContainer.getNumberOfFetchableKeys()(exclusive). Other Fetchable objects may have a special negative value.The main intent of this key is to index e.g.
Fetchobjects in an array.- Specified by:
getFetchableKeyin interfaceCompositeIdentifierMapping- Specified by:
getFetchableKeyin interfaceFetchable
-