Package org.hibernate.metamodel.mapping
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
- All Known Implementing Classes:
AnonymousTupleNonAggregatedEntityIdentifierMapping
,InverseNonAggregatedIdentifierMapping
,NonAggregatedIdentifierMappingImpl
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
NonAggregatedIdentifierMapping.IdentifierValueMapper
Think of an AttributeConverter for id values to account for representation difference between virtual and id-class mappings-
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.EntityIdentifierMapping
EntityIdentifierMapping.Nature
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer
-
-
Field Summary
-
Fields inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getFetchableKey()
The key that identifies this Fetchable within aFetchableContainer
.IdClassEmbeddable
getIdClassEmbeddable()
The id-class representation of this id mappingNonAggregatedIdentifierMapping.IdentifierValueMapper
getIdentifierValueMapper()
The id-class, if there is one, otherwise the virtual-id.VirtualIdEmbeddable
getVirtualIdEmbeddable()
The virtual-id representation of this id mapping-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.CompositeIdentifierMapping
getMappedIdEmbeddableTypeDescriptor, getPartMappingType, getUnsavedStrategy, hasContainingClass
-
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicate
-
Methods inherited from interface org.hibernate.metamodel.mapping.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, visitSubParts
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getAttributeName, getIdentifier, getIdentifierIfNotUnsaved, getNature, getPartName, instantiate, isEntityIdentifierMapping, setIdentifier
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, generateFetch, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetch
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchStyleAccess
getStyle
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchTimingAccess
getTiming
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, createDomainResult, decompose, findContainingEntityMapping, getNavigableRole
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinType
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStem
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachNonFormula, forEachSelectable, getContainingTableExpression, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
-
-
-
Method Detail
-
getVirtualIdEmbeddable
VirtualIdEmbeddable getVirtualIdEmbeddable()
The virtual-id representation of this id mapping
-
getIdClassEmbeddable
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:Fetchable
The 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.
Fetch
objects in an array.- Specified by:
getFetchableKey
in interfaceCompositeIdentifierMapping
- Specified by:
getFetchableKey
in interfaceFetchable
-
-