Top Description Fields Constructors Methods
org.hibernate.metamodel.mapping.internal

public Class EmbeddedIdentifierMappingImpl

extends AbstractCompositeIdentifierMapping
implements AggregatedIdentifierMapping
Class Inheritance
All Implemented Interfaces
org.hibernate.metamodel.mapping.AggregatedIdentifierMapping, org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping, org.hibernate.metamodel.mapping.AttributeMetadata, org.hibernate.metamodel.mapping.AttributeMapping, org.hibernate.type.descriptor.java.MutabilityPlanExposer, org.hibernate.metamodel.mapping.PropertyBasedMapping, org.hibernate.sql.results.graph.DatabaseSnapshotContributor, org.hibernate.sql.results.graph.Fetchable, org.hibernate.metamodel.mapping.ModelPart, org.hibernate.metamodel.mapping.MappingModelExpressible, org.hibernate.metamodel.mapping.Bindable, org.hibernate.metamodel.mapping.JdbcMappingContainer, org.hibernate.metamodel.mapping.OwnedValuedModelPart, org.hibernate.metamodel.mapping.ValuedModelPart, org.hibernate.metamodel.mapping.SelectableMappings, org.hibernate.metamodel.mapping.ValueMapping, org.hibernate.type.descriptor.java.JavaTypedExpressible, org.hibernate.metamodel.mapping.EntityIdentifierMapping
Imports
java.util.function.BiConsumer, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping, org.hibernate.metamodel.mapping.AggregatedIdentifierMapping, .EmbeddableMappingType, .EntityMappingType, .JdbcMapping, org.hibernate.property.access.spi.PropertyAccess, org.hibernate.proxy.HibernateProxy, .LazyInitializer, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlSelection, org.hibernate.sql.ast.tree.from.TableGroup, org.hibernate.sql.results.graph.DomainResultCreationState

Support for jakarta.persistence.EmbeddedId
Author
Andrea Boriero

Field Summary

Modifier and TypeField and Description
private final EmbeddableMappingType
private final String
private final PropertyAccess
Inherited from org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping:
sessionFactory

Constructor Summary

AccessConstructor and Description
public
EmbeddedIdentifierMappingImpl(EntityMappingType entityMapping, String name, EmbeddableMappingType embeddableDescriptor, PropertyAccess propertyAccess, String tableExpression, MappingModelCreationProcess creationProcess)

Method Summary

Modifier and TypeMethod and Description
public void
applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)

Implements org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.
public void
applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer)

Implements org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.
public int
public String
public String
public Object
getIdentifier(Object entity)

Implements org.hibernate.metamodel.mapping.EntityIdentifierMapping.getIdentifier.

Extract the identifier from an instance of the entity
public EmbeddableMappingType
getMappedIdEmbeddableTypeDescriptor()

Implements org.hibernate.metamodel.mapping.CompositeIdentifierMapping.getMappedIdEmbeddableTypeDescriptor.

Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.
public EntityIdentifierMapping.Nature
public EmbeddableMappingType
public String
public PropertyAccess
public String
getSqlAliasStem()

Implements org.hibernate.sql.ast.tree.from.TableGroupProducer.getSqlAliasStem.

Get 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.

public void
setIdentifier(Object entity, Object id, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.EntityIdentifierMapping.setIdentifier.

Inject an identifier value into an instance of the entity
Inherited from org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping:
containsTableReferencecreateDomainResultcreateRootTableGroupJoincreateTableGroupJoinfindContainingEntityMappingfindSubPartforEachJdbcValuegenerateFetchgetContainingTableExpressiongetEmbeddableTypeDescriptorgetEntityMappinggetMappedFetchOptionsgetMappedTypegetNavigableRolegetStylegetTiminghasContainingClasshasPartitionedSelectionMappinginstantiatetoSqlExpressionvisitSubParts

Field Detail

embeddableDescriptorback to summary
private final EmbeddableMappingType embeddableDescriptor
nameback to summary
private final String name
propertyAccessback to summary
private final PropertyAccess propertyAccess

Constructor Detail

EmbeddedIdentifierMappingImplback to summary
public EmbeddedIdentifierMappingImpl(EntityMappingType entityMapping, String name, EmbeddableMappingType embeddableDescriptor, PropertyAccess propertyAccess, String tableExpression, MappingModelCreationProcess creationProcess)

Method Detail

applySqlSelectionsback to summary
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)

Implements org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Doc from org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.

Annotations
@Override
applySqlSelectionsback to summary
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer)

Implements org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Doc from org.hibernate.metamodel.mapping.ModelPart.applySqlSelections.

Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.

Annotations
@Override
compareback to summary
public int compare(Object value1, Object value2)

Overrides default org.hibernate.metamodel.mapping.AttributeMapping.compare.

Annotations
@Override
getAttributeNameback to summary
public String getAttributeName()

Implements org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping.getAttributeName, org.hibernate.metamodel.mapping.EntityIdentifierMapping.getAttributeName.

Doc from org.hibernate.metamodel.mapping.EntityIdentifierMapping.getAttributeName.

The name of the attribute defining the id, if one

Annotations
@Override
getFetchableNameback to summary
public String getFetchableName()

Implements org.hibernate.sql.results.graph.Fetchable.getFetchableName.

Doc from org.hibernate.sql.results.graph.Fetchable.getFetchableName.

The name of the fetchable. This is the part's "local name".

Annotations
@Override
getIdentifierback to summary
public Object getIdentifier(Object entity)

Implements org.hibernate.metamodel.mapping.EntityIdentifierMapping.getIdentifier.

Doc from org.hibernate.metamodel.mapping.EntityIdentifierMapping.getIdentifier.

Extract the identifier from an instance of the entity

Annotations
@Override
getMappedIdEmbeddableTypeDescriptorback to summary
public EmbeddableMappingType getMappedIdEmbeddableTypeDescriptor()

Implements org.hibernate.metamodel.mapping.CompositeIdentifierMapping.getMappedIdEmbeddableTypeDescriptor.

Doc from org.hibernate.metamodel.mapping.CompositeIdentifierMapping.getMappedIdEmbeddableTypeDescriptor.

Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.

Annotations
@Override
getNatureback to summary
public EntityIdentifierMapping.Nature getNature()

Implements org.hibernate.metamodel.mapping.EntityIdentifierMapping.getNature.

Annotations
@Override
getPartMappingTypeback to summary
public EmbeddableMappingType getPartMappingType()

Implements org.hibernate.metamodel.mapping.ModelPart.getPartMappingType, org.hibernate.metamodel.mapping.CompositeIdentifierMapping.getPartMappingType.

Doc from org.hibernate.metamodel.mapping.ModelPart.getPartMappingType.

The type for this part.

Annotations
@Override
getPartNameback to summary
public String getPartName()

Overrides default org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping.getPartName, org.hibernate.metamodel.mapping.EntityIdentifierMapping.getPartName.

Implements org.hibernate.metamodel.mapping.ModelPart.getPartName.

Doc from org.hibernate.metamodel.mapping.ModelPart.getPartName.

The local part name, which is generally the unqualified role name

Annotations
@Override
getPropertyAccessback to summary
public PropertyAccess getPropertyAccess()

Implements org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping.getPropertyAccess.

Doc from org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping.getPropertyAccess.

Access to the identifier attribute's PropertyAccess

Annotations
@Override
getSqlAliasStemback to summary
public String getSqlAliasStem()

Implements org.hibernate.sql.ast.tree.from.TableGroupProducer.getSqlAliasStem.

Doc from org.hibernate.sql.ast.tree.from.TableGroupProducer.getSqlAliasStem.

Get 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.

Annotations
@Override
setIdentifierback to summary
public void setIdentifier(Object entity, Object id, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.EntityIdentifierMapping.setIdentifier.

Doc from org.hibernate.metamodel.mapping.EntityIdentifierMapping.setIdentifier.

Inject an identifier value into an instance of the entity

Annotations
@Override