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,PropertyBasedMapping,Queryable,SingularAttributeMapping,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 implementNonAggregatedIdentifierMapping.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
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
ROLE_LOCAL_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.voidbreakDownJdbcValues(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session)Objectdisassemble(Object value, SharedSessionContractImplementor session)intforEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)FetchablegetFetchable(int position)StringgetFetchableName()The name of the fetchableIdClassEmbeddablegetIdClassEmbeddable()The id-class representation of this id mappingObjectgetIdentifier(Object entity)ObjectgetIdentifier(Object entity, SharedSessionContractImplementor session)NonAggregatedIdentifierMapping.IdentifierValueMappergetIdentifierValueMapper()The id-class, if there is one, otherwise the virtual-id.EmbeddableMappingTypegetMappedIdEmbeddableTypeDescriptor()Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.intgetNumberOfFetchables()The number of fetchables in the containerEmbeddableMappingTypegetPartMappingType()StringgetPartName()StringgetSqlAliasStem()Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedVirtualIdEmbeddablegetVirtualIdEmbeddable()The virtual-id representation of this id mappingbooleanhasContainingClass()Does the identifier have a corresponding EmbeddableId or IdClass?Objectinstantiate()voidsetIdentifier(Object entity, Object id, SharedSessionContractImplementor session)SqlTupletoSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState)-
Methods inherited from class org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping
asEmbeddedAttributeMapping, createDomainResult, createRootTableGroupJoin, createTableGroupJoin, findSubPart, forEachSelectable, generateFetch, getContainingTableExpression, getEmbeddableTypeDescriptor, getMappedType, getNavigableRole, getParentInjectionAttributePropertyAccess, isEmbeddedAttributeMapping, toString, visitSubParts
-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractSingularAttributeMapping
getPropertyAccess, getValueGeneration
-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractStateArrayContributorMapping
getAttributeMetadataAccess, getMappedFetchOptions, getStateArrayPosition, getStyle, getTiming
-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
getAttributeName, getDeclaringType, getJavaType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asPluralAttributeMapping, findContainingEntityMapping, getAttributeMetadataAccess, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getStateArrayPosition, getValue, isPluralAttributeMapping, setValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.CompositeIdentifierMapping
getUnsavedStrategy
-
Methods inherited from interface org.hibernate.sql.results.graph.DatabaseSnapshotContributor
createSnapshotDomainResult
-
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicate
-
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableValuedModelPart
forEachDisassembledJdbcValue, forEachJdbcType, forEachSelectable, getContainingTableExpression, getEmbeddableTypeDescriptor, getJdbcMappings, getJdbcTypeCount, getParentInjectionAttributePropertyAccess
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getIdentifierIfNotUnsaved
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getMappedFetchOptions, incrementFetchDepth, resolveCircularFetch
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, 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
areEqual, createDomainResult, forEachSelectable, getJavaType, getNavigableRole
-
Methods inherited from interface org.hibernate.metamodel.mapping.Queryable
findByPath, findSubPart, findSubTypesSubPart, resolveSubPart, visitSubParts
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createRootTableGroupJoin, createTableGroupJoin, createTableGroupJoin
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
-
-
-
-
Method Detail
-
instantiate
public Object instantiate()
- Specified by:
instantiatein interfaceEntityIdentifierMapping
-
getPartName
public String getPartName()
- Specified by:
getPartNamein interfaceAttributeMapping- Specified by:
getPartNamein interfaceEntityIdentifierMapping- Specified by:
getPartNamein interfaceModelPart
-
getPartMappingType
public EmbeddableMappingType getPartMappingType()
- Specified by:
getPartMappingTypein interfaceCompositeIdentifierMapping- Specified by:
getPartMappingTypein interfaceModelPart- Overrides:
getPartMappingTypein classAbstractAttributeMapping
-
getIdClassEmbeddable
public IdClassEmbeddable getIdClassEmbeddable()
Description copied from interface:NonAggregatedIdentifierMappingThe id-class representation of this id mapping- Specified by:
getIdClassEmbeddablein interfaceNonAggregatedIdentifierMapping
-
getVirtualIdEmbeddable
public VirtualIdEmbeddable getVirtualIdEmbeddable()
Description copied from interface:NonAggregatedIdentifierMappingThe virtual-id representation of this id mapping- Specified by:
getVirtualIdEmbeddablein interfaceNonAggregatedIdentifierMapping
-
getIdentifierValueMapper
public NonAggregatedIdentifierMapping.IdentifierValueMapper 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
public EmbeddableMappingType 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
-
disassemble
public Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemblein interfaceBindable- Specified by:
disassemblein interfaceEmbeddableValuedModelPart- See Also:
As an example, consider the following domain model: ````
-
forEachJdbcValue
public int forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachJdbcValuein interfaceBindable- Specified by:
forEachJdbcValuein interfaceEmbeddableValuedModelPart
-
toSqlExpression
public SqlTuple toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState)
- Specified by:
toSqlExpressionin interfaceEmbeddableValuedModelPart- Overrides:
toSqlExpressionin classEmbeddedAttributeMapping
-
getIdentifier
public Object getIdentifier(Object entity, SharedSessionContractImplementor session)
- Specified by:
getIdentifierin interfaceEntityIdentifierMapping- Returns:
- the entity identifier value
-
getIdentifier
public Object getIdentifier(Object entity)
- Specified by:
getIdentifierin interfaceEntityIdentifierMapping
-
setIdentifier
public void setIdentifier(Object entity, Object id, SharedSessionContractImplementor session)
- Specified by:
setIdentifierin interfaceEntityIdentifierMapping
-
breakDownJdbcValues
public void breakDownJdbcValues(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session)
- Specified by:
breakDownJdbcValuesin interfaceModelPart- Overrides:
breakDownJdbcValuesin classEmbeddedAttributeMapping
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceModelPart- Overrides:
applySqlSelectionsin classEmbeddedAttributeMapping
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceModelPart- Overrides:
applySqlSelectionsin classEmbeddedAttributeMapping
-
getSqlAliasStem
public String 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 generated Note 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:
SqlAliasBaseManager.createSqlAliasBase(java.lang.String)
-
getFetchableName
public String getFetchableName()
Description copied from interface:FetchableThe name of the fetchable- Specified by:
getFetchableNamein interfaceFetchable- Overrides:
getFetchableNamein classAbstractStateArrayContributorMapping
-
getNumberOfFetchables
public int getNumberOfFetchables()
Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer- Overrides:
getNumberOfFetchablesin classEmbeddedAttributeMapping
-
getFetchable
public Fetchable getFetchable(int position)
- Specified by:
getFetchablein interfaceFetchableContainer- Overrides:
getFetchablein classEmbeddedAttributeMapping
-
-