Class EmbeddedIdentifierMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
-
- org.hibernate.metamodel.mapping.internal.EmbeddedIdentifierMappingImpl
-
- All Implemented Interfaces:
Bindable,CompositeIdentifierMapping,EmbeddableValuedModelPart,EntityIdentifierMapping,SingleAttributeIdentifierMapping,JdbcMappingContainer,MappingModelExpressible,ModelPart,ModelPartContainer,PropertyBasedMapping,Queryable,ValueMapping,TableGroupJoinProducer,TableGroupProducer,EmbeddableValuedFetchable,Fetchable,FetchableContainer,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible
public class EmbeddedIdentifierMappingImpl extends AbstractCompositeIdentifierMapping implements SingleAttributeIdentifierMapping
Support forEmbeddedId
-
-
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
-
-
Field Summary
-
Fields inherited from class org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
sessionFactory
-
Fields inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ROLE_LOCAL_NAME
-
-
Constructor Summary
Constructors Constructor Description EmbeddedIdentifierMappingImpl(EntityMappingType entityMapping, String name, EmbeddableMappingType embeddableDescriptor, PropertyAccess propertyAccess, String tableExpression, MappingModelCreationProcess creationProcess)
-
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)intforEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)StringgetAttributeName()FetchablegetFetchable(int position)StringgetFetchableName()The name of the fetchableObjectgetIdentifier(Object entity)ObjectgetIdentifier(Object entity, SharedSessionContractImplementor session)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()PropertyAccessgetPropertyAccess()Access to the identifier attribute's PropertyAccessStringgetSqlAliasStem()Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedvoidsetIdentifier(Object entity, Object id, SharedSessionContractImplementor session)-
Methods inherited from class org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
createDomainResult, createRootTableGroupJoin, createTableGroupJoin, findContainingEntityMapping, findSubPart, forEachJdbcValue, generateFetch, getContainingTableExpression, getEmbeddableTypeDescriptor, getEntityMapping, getJavaType, getMappedFetchOptions, getMappedType, getNavigableRole, getStyle, getTiming, hasContainingClass, instantiate, toSqlExpression, 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, forEachJdbcType, 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
forEachJdbcType, forEachSelectable, getJdbcMappings, getJdbcTypeCount, getParentInjectionAttributePropertyAccess
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getIdentifierIfNotUnsaved, instantiate
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, 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.metamodel.mapping.ModelPart
areEqual, createDomainResult, findContainingEntityMapping, forEachSelectable, getJavaType, getNavigableRole
-
Methods inherited from interface org.hibernate.metamodel.mapping.Queryable
findByPath, findSubTypesSubPart, resolveSubPart
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, 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
-
-
-
-
Constructor Detail
-
EmbeddedIdentifierMappingImpl
public EmbeddedIdentifierMappingImpl(EntityMappingType entityMapping, String name, EmbeddableMappingType embeddableDescriptor, PropertyAccess propertyAccess, String tableExpression, MappingModelCreationProcess creationProcess)
-
-
Method Detail
-
getPartName
public String getPartName()
- Specified by:
getPartNamein interfaceEntityIdentifierMapping- Specified by:
getPartNamein interfaceModelPart
-
getPartMappingType
public EmbeddableMappingType getPartMappingType()
- Specified by:
getPartMappingTypein interfaceCompositeIdentifierMapping- Specified by:
getPartMappingTypein interfaceModelPart
-
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
-
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
-
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
-
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
-
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- See Also:
SqlAliasBaseManager.createSqlAliasBase(java.lang.String)
-
getFetchableName
public String getFetchableName()
Description copied from interface:FetchableThe name of the fetchable- Specified by:
getFetchableNamein interfaceFetchable
-
getNumberOfFetchables
public int getNumberOfFetchables()
Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer
-
getFetchable
public Fetchable getFetchable(int position)
- Specified by:
getFetchablein interfaceFetchableContainer
-
getPropertyAccess
public PropertyAccess getPropertyAccess()
Description copied from interface:SingleAttributeIdentifierMappingAccess to the identifier attribute's PropertyAccess- Specified by:
getPropertyAccessin interfacePropertyBasedMapping- Specified by:
getPropertyAccessin interfaceSingleAttributeIdentifierMapping
-
getAttributeName
public String getAttributeName()
- Specified by:
getAttributeNamein interfaceSingleAttributeIdentifierMapping
-
breakDownJdbcValues
public void breakDownJdbcValues(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session)
- Specified by:
breakDownJdbcValuesin interfaceModelPart
-
forEachDisassembledJdbcValue
public int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValuein interfaceBindable- Specified by:
forEachDisassembledJdbcValuein interfaceEmbeddableValuedModelPart
-
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: ````
-
-