Class NonAggregatedIdentifierMappingImpl
java.lang.Object
org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
org.hibernate.metamodel.mapping.internal.NonAggregatedIdentifierMappingImpl
- All Implemented Interfaces:
Bindable
,CompositeIdentifierMapping
,EmbeddableValuedModelPart
,EntityIdentifierMapping
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,ModelPartContainer
,NonAggregatedIdentifierMapping
,SelectableMappings
,ValuedModelPart
,ValueMapping
,VirtualModelPart
,TableGroupJoinProducer
,TableGroupProducer
,EmbeddableValuedFetchable
,Fetchable
,FetchableContainer
,FetchOptions
,FetchStyleAccess
,FetchTimingAccess
,JavaTypedExpressible
public class NonAggregatedIdentifierMappingImpl
extends AbstractCompositeIdentifierMapping
implements NonAggregatedIdentifierMapping
-
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.EntityIdentifierMapping
EntityIdentifierMapping.Nature
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.NonAggregatedIdentifierMapping
NonAggregatedIdentifierMapping.IdentifierValueMapper
-
Field Summary
Fields inherited from class org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
sessionFactory
Fields inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
NonAggregatedIdentifierMappingImpl
(EntityPersister entityPersister, RootClass bootEntityDescriptor, String rootTableName, String[] rootTableKeyColumnNames, MappingModelCreationProcess creationProcess) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCacheKey
(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.void
applySqlSelections
(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.void
applySqlSelections
(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.boolean
areEqual
(@Nullable Object one, @Nullable Object other, SharedSessionContractImplementor session) <X,
Y> int breakDownJdbcValues
(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.<T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.disassemble
(Object value, SharedSessionContractImplementor session) Breaks down a value ofJ
into its simple pieces.<X,
Y> int forEachJdbcValue
(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.generateFetch
(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchableThe name of the attribute defining the id, if onegetFetchable
(int position) The name of the fetchable.The id-class representation of this id mappinggetIdentifier
(Object entity) Extract the identifier from an instance of the entityThe id-class, if there is one, otherwise the virtual-id.Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.Descriptor for the type of this mappingint
The number of fetchables in the containerThe type for this part.Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedThe virtual-id representation of this id mappingboolean
Does the identifier have a corresponding EmbeddableId or IdClass?void
setIdentifier
(Object entity, Object id, SharedSessionContractImplementor session) Inject an identifier value into an instance of the entitytoSqlExpression
(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) Methods inherited from class org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
containsTableReference, createRootTableGroupJoin, createTableGroupJoin, findContainingEntityMapping, findSubPart, getContainingTableExpression, getEmbeddableTypeDescriptor, getEntityMapping, getMappedFetchOptions, getNavigableRole, getStyle, getTiming, hasPartitionedSelectionMapping, instantiate, visitSubParts
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
getUnsavedStrategy
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicate
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableValuedModelPart
decompose, findSubPart, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachSelectable, forEachSubPart, forEachUpdatable, getEmbeddableTypeDescriptor, getJavaType, getJdbcMapping, getJdbcTypeCount, getParentInjectionAttributePropertyAccess, getSelectable, getSelectableIndex, hasPartitionedSelectionMapping, visitSubParts
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getIdentifierIfNotUnsaved, getPartName, instantiate, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, 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.metamodel.mapping.ModelPart
asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, findContainingEntityMapping, getNavigableRole
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
Methods inherited from interface org.hibernate.metamodel.mapping.NonAggregatedIdentifierMapping
getFetchableKey
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
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
-
Constructor Details
-
NonAggregatedIdentifierMappingImpl
public NonAggregatedIdentifierMappingImpl(EntityPersister entityPersister, RootClass bootEntityDescriptor, String rootTableName, String[] rootTableKeyColumnNames, MappingModelCreationProcess creationProcess) -
NonAggregatedIdentifierMappingImpl
-
-
Method Details
-
getMappedType
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceEmbeddableValuedModelPart
- Specified by:
getMappedType
in interfaceValueMapping
- Overrides:
getMappedType
in classAbstractCompositeIdentifierMapping
-
getPartMappingType
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceCompositeIdentifierMapping
- Specified by:
getPartMappingType
in interfaceModelPart
-
getIdClassEmbeddable
Description copied from interface:NonAggregatedIdentifierMapping
The id-class representation of this id mapping- Specified by:
getIdClassEmbeddable
in interfaceNonAggregatedIdentifierMapping
-
getVirtualIdEmbeddable
Description copied from interface:NonAggregatedIdentifierMapping
The virtual-id representation of this id mapping- Specified by:
getVirtualIdEmbeddable
in interfaceNonAggregatedIdentifierMapping
-
getIdentifierValueMapper
Description copied from interface:NonAggregatedIdentifierMapping
The id-class, if there is one, otherwise the virtual-id.- Specified by:
getIdentifierValueMapper
in interfaceNonAggregatedIdentifierMapping
-
hasContainingClass
public boolean hasContainingClass()Description copied from interface:CompositeIdentifierMapping
Does the identifier have a corresponding EmbeddableId or IdClass?- Specified by:
hasContainingClass
in interfaceCompositeIdentifierMapping
- Overrides:
hasContainingClass
in classAbstractCompositeIdentifierMapping
- Returns:
- false if there is not an IdCass or an EmbeddableId
-
getMappedIdEmbeddableTypeDescriptor
Description copied from interface:CompositeIdentifierMapping
Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.- Specified by:
getMappedIdEmbeddableTypeDescriptor
in interfaceCompositeIdentifierMapping
-
toSqlExpression
public SqlTuple toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) - Specified by:
toSqlExpression
in interfaceEmbeddableValuedModelPart
- Overrides:
toSqlExpression
in classAbstractCompositeIdentifierMapping
-
getNature
- Specified by:
getNature
in interfaceEntityIdentifierMapping
- See Also:
-
getAttributeName
Description copied from interface:EntityIdentifierMapping
The name of the attribute defining the id, if one- Specified by:
getAttributeName
in interfaceEntityIdentifierMapping
-
getIdentifier
Description copied from interface:EntityIdentifierMapping
Extract the identifier from an instance of the entity- Specified by:
getIdentifier
in interfaceEntityIdentifierMapping
-
getSqlAliasStem
Description copied from interface:TableGroupProducer
Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedNote that this is a metadata-ive value. It is only ever used internal to the producer producing its TableGroup.
- Specified by:
getSqlAliasStem
in interfaceTableGroupProducer
- See Also:
-
getFetchableName
Description copied from interface:Fetchable
The name of the fetchable. This is the part's "local name".- Specified by:
getFetchableName
in interfaceFetchable
- See Also:
-
getNumberOfFetchables
public int getNumberOfFetchables()Description copied from interface:FetchableContainer
The number of fetchables in the container- Specified by:
getNumberOfFetchables
in interfaceEmbeddableValuedModelPart
- Specified by:
getNumberOfFetchables
in interfaceFetchableContainer
-
getFetchable
- Specified by:
getFetchable
in interfaceEmbeddableValuedModelPart
- Specified by:
getFetchable
in interfaceFetchableContainer
-