Class InverseNonAggregatedIdentifierMapping
java.lang.Object
org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
org.hibernate.metamodel.mapping.internal.AbstractStateArrayContributorMapping
org.hibernate.metamodel.mapping.internal.AbstractSingularAttributeMapping
org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping
org.hibernate.metamodel.mapping.internal.InverseNonAggregatedIdentifierMapping
- All Implemented Interfaces:
AttributeMapping,Bindable,CompositeIdentifierMapping,EmbeddableValuedModelPart,EntityIdentifierMapping,JdbcMappingContainer,MappingModelExpressible,ModelPart,ModelPartContainer,NonAggregatedIdentifierMapping,OwnedValuedModelPart,PropertyBasedMapping,SelectableMappings,SingularAttributeMapping,ValuedModelPart,ValueMapping,VirtualModelPart,TableGroupJoinProducer,TableGroupProducer,DatabaseSnapshotContributor,EmbeddableValuedFetchable,Fetchable,FetchableContainer,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible,MutabilityPlanExposer
public class InverseNonAggregatedIdentifierMapping
extends EmbeddedAttributeMapping
implements NonAggregatedIdentifierMapping
The inverse part of a "non-aggregated" composite identifier.
Exposes the virtual id embeddable as mapping type, which requires the attribute mapping to implement
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.NatureNested 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 interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplySqlSelections(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.booleanareEqual(@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.disassemble(Object value, SharedSessionContractImplementor session) Breaks down a value ofJinto 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.getFetchable(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 entitygetIdentifier(Object entity, MergeContext mergeContext) 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.intThe number of fetchables in the containerThe type for this part.The local part name, which is generally the unqualified role nameGet 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 mappingbooleanDoes the identifier have a corresponding EmbeddableId or IdClass?Instantiate an instance of the identifier.voidsetIdentifier(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.mapping.internal.EmbeddedAttributeMapping
asEmbeddedAttributeMapping, compare, containsTableReference, createDomainResult, createRootTableGroupJoin, createTableGroupJoin, generateFetch, getContainingTableExpression, getEmbeddableTypeDescriptor, getMappedType, getNavigableRole, getParentInjectionAttributePropertyAccess, isEmbeddedAttributeMapping, isSelectable, toStringMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractSingularAttributeMapping
getGeneratorMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractStateArrayContributorMapping
getMappedFetchOptions, getStyle, getTimingMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
getAttributeMetadata, getAttributeName, getDeclaringType, getFetchableKey, getJavaType, getPropertyAccess, getStateArrayPositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asPluralAttributeMapping, findContainingEntityMapping, getAttributeMetadata, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getPropertyAccess, getStateArrayPosition, getValue, isPluralAttributeMapping, setValueMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.CompositeIdentifierMapping
getUnsavedStrategyMethods inherited from interface org.hibernate.sql.results.graph.DatabaseSnapshotContributor
createSnapshotDomainResultMethods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicateMethods inherited from interface org.hibernate.metamodel.mapping.EmbeddableValuedModelPart
decompose, findSubPart, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachSelectable, forEachSubPart, forEachUpdatable, getEmbeddableTypeDescriptor, getJavaType, getJdbcMapping, getJdbcTypeCount, getMappedType, getParentInjectionAttributePropertyAccess, getSelectable, getSelectableIndex, hasPartitionedSelectionMapping, visitSubPartsMethods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getAttributeName, getIdentifierIfNotUnsaved, isEntityIdentifierMappingMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.sql.results.graph.FetchStyleAccess
getStyleMethods inherited from interface org.hibernate.sql.results.graph.FetchTimingAccess
getTimingMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, createDomainResult, decompose, getNavigableRoleMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.metamodel.mapping.NonAggregatedIdentifierMapping
getFetchableKeyMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinTypeMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReferenceMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachNonFormula, forEachSelectable, getContainingTableExpression, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAsMethods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Method Details
-
instantiate
Description copied from interface:EntityIdentifierMappingInstantiate an instance of the identifier.- Specified by:
instantiatein interfaceEntityIdentifierMapping
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceAttributeMapping- Specified by:
getPartNamein interfaceEntityIdentifierMapping- Specified by:
getPartNamein interfaceModelPart
-
getNature
- Specified by:
getNaturein interfaceEntityIdentifierMapping- See Also:
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceCompositeIdentifierMapping- Specified by:
getPartMappingTypein interfaceModelPart- Overrides:
getPartMappingTypein classAbstractAttributeMapping
-
getIdClassEmbeddable
Description copied from interface:NonAggregatedIdentifierMappingThe id-class representation of this id mapping- Specified by:
getIdClassEmbeddablein interfaceNonAggregatedIdentifierMapping
-
getVirtualIdEmbeddable
Description copied from interface:NonAggregatedIdentifierMappingThe virtual-id representation of this id mapping- Specified by:
getVirtualIdEmbeddablein interfaceNonAggregatedIdentifierMapping
-
getIdentifierValueMapper
Description copied from interface:NonAggregatedIdentifierMappingThe id-class, if there is one, otherwise the virtual-id.- Specified by:
getIdentifierValueMapperin interfaceNonAggregatedIdentifierMapping
-
hasContainingClass
public boolean hasContainingClass()Description copied from interface:CompositeIdentifierMappingDoes the identifier have a corresponding EmbeddableId or IdClass?- Specified by:
hasContainingClassin interfaceCompositeIdentifierMapping- Returns:
- false if there is not an IdCass or an EmbeddableId
-
getMappedIdEmbeddableTypeDescriptor
Description copied from interface:CompositeIdentifierMappingReturns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.- Specified by:
getMappedIdEmbeddableTypeDescriptorin interfaceCompositeIdentifierMapping
-
toSqlExpression
public SqlTuple toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) - Specified by:
toSqlExpressionin interfaceEmbeddableValuedModelPart- Overrides:
toSqlExpressionin classEmbeddedAttributeMapping
-
getIdentifier
Description copied from interface:EntityIdentifierMappingExtract the identifier from an instance of the entity- Specified by:
getIdentifierin interfaceEntityIdentifierMapping
-
getIdentifier
Description copied from interface:EntityIdentifierMappingExtract the identifier from an instance of the entity- Specified by:
getIdentifierin interfaceEntityIdentifierMapping
-
getSqlAliasStem
Description copied from interface:TableGroupProducerGet 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:
getSqlAliasStemin interfaceTableGroupProducer- Overrides:
getSqlAliasStemin classEmbeddedAttributeMapping- See Also:
-
getFetchableName
Description copied from interface:FetchableThe name of the fetchable. This is the part's "local name".- Specified by:
getFetchableNamein interfaceFetchable- Overrides:
getFetchableNamein classAbstractStateArrayContributorMapping- See Also:
-
getNumberOfFetchables
public int getNumberOfFetchables()Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceEmbeddableValuedModelPart- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer
-
getFetchable
- Specified by:
getFetchablein interfaceEmbeddableValuedModelPart- Specified by:
getFetchablein interfaceFetchableContainer
-