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

public Class CompoundNaturalIdMapping

extends AbstractNaturalIdMapping
implements MappingType, FetchableContainer
Class Inheritance
All Implemented Interfaces
org.hibernate.sql.results.graph.FetchableContainer, org.hibernate.metamodel.mapping.ModelPartContainer, org.hibernate.metamodel.mapping.ModelPart, org.hibernate.metamodel.mapping.MappingModelExpressible, org.hibernate.metamodel.mapping.Bindable, org.hibernate.metamodel.mapping.JdbcMappingContainer, org.hibernate.metamodel.mapping.MappingType
Imports
java.util.ArrayList, .Arrays, .List, .Map, java.util.function.BiConsumer, .Consumer, org.hibernate.HibernateException, org.hibernate.cache.MutableCacheKeyBuilder, org.hibernate.engine.spi.PersistenceContext, .SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.internal.util.IndexedConsumer, org.hibernate.loader.ast.internal.CompoundNaturalIdLoader, .MultiNaturalIdLoaderInPredicate, org.hibernate.loader.ast.spi.MultiNaturalIdLoader, .NaturalIdLoader, org.hibernate.metamodel.UnsupportedMappingException, org.hibernate.metamodel.mapping.AttributeMapping, .AttributeMetadata, .EntityMappingType, .JdbcMapping, .MappingType, .ModelPart, .NaturalIdMapping, .SelectableConsumer, .SingularAttributeMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlSelection, org.hibernate.sql.ast.tree.from.TableGroup, org.hibernate.sql.results.graph.AssemblerCreationState, .DomainResult, .DomainResultAssembler, .DomainResultCreationState, .Fetch, .FetchParent, .FetchParentAccess, .Fetchable, .FetchableContainer, org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.graph.internal.ImmutableFetchList, org.hibernate.sql.results.jdbc.spi.JdbcValuesSourceProcessingOptions, .RowProcessingState, org.hibernate.type.descriptor.java.JavaType

Multi-attribute NaturalIdMapping implementation

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
private static class

Field Summary

Modifier and TypeField and Description
private final List<SingularAttributeMapping>
private List<JdbcMapping>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addToCacheKey(MutableCacheKeyBuilder
the MutableCacheKey used to add the disassembled value and the hashCode
cacheKey
,
Object
the value to disassemble
value
,
SharedSessionContractImplementor
the SharedSessionContractImplementor
session
)

Implements org.hibernate.metamodel.mapping.Bindable.addToCacheKey.

Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.
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 boolean
public <X, Y> int
breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.ModelPart.breakDownJdbcValues.

Breaks down the domain value to its constituent JDBC values.
public int
calculateHashCode(Object
The natural-id value
value
)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.calculateHashCode.

Calculate the hash-code of a natural-id value
public <T> DomainResult<T>
createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)

Implements org.hibernate.metamodel.mapping.ModelPart.createDomainResult.

Create a DomainResult for a specific reference to this ModelPart.
public Object
disassemble(Object value, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.Bindable.disassemble.

Breaks down a value of J into its simple pieces.
public Object[]
extractNaturalIdFromEntity(Object
The entity instance
entity
)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.extractNaturalIdFromEntity.

Given an entity instance, extract the normalized natural id representation
public Object[]
extractNaturalIdFromEntityState(Object[]
The attribute state array
state
)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.extractNaturalIdFromEntityState.

Given an array of "full entity state", extract the normalized natural id representation
public ModelPart
public <X, Y> int
public int
forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)

Implements org.hibernate.metamodel.mapping.JdbcMappingContainer.forEachJdbcType.

Visit each JdbcMapping starting from the given offset
public <X, Y> int
forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session)

Overrides default org.hibernate.metamodel.mapping.Bindable.forEachJdbcValue.

Visit each constituent JDBC value extracted from the entity instance itself.
public int
forEachSelectable(int offset, SelectableConsumer consumer)

Overrides default org.hibernate.metamodel.mapping.ModelPart.forEachSelectable.

Visits each selectable mapping with the selectable index offset by the given value.
public void
public Fetchable
public JavaType<?>
getJavaType()

Implements org.hibernate.metamodel.mapping.ModelPart.getJavaType.

The Java type for this part.
public JdbcMapping
public int
getJdbcTypeCount()

Overrides default org.hibernate.metamodel.mapping.Bindable.getJdbcTypeCount.

The number of JDBC mappings
public JavaType<?>
public List<SingularAttributeMapping>
public int
public MappingType
public boolean
private static boolean
public NaturalIdLoader<?>
makeLoader(EntityMappingType entityDescriptor)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.makeLoader.

Make a loader capable of loading a single entity by natural-id
public MultiNaturalIdLoader<?>
makeMultiLoader(EntityMappingType entityDescriptor)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.makeMultiLoader.

Make a loader capable of loading multiple entities by natural-id
public Object[]
normalizeInput(Object
The user-supplied value
incoming
)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.normalizeInput.

Normalize a user-provided natural-id value into the representation Hibernate uses internally
public void
validateInternalForm(Object naturalIdValue)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.validateInternalForm.

Validates a natural id value(s) for the described natural-id based on the expected internal representation
public void
verifyFlushState(Object id, Object[] currentState, Object[] loadedState, SharedSessionContractImplementor session)

Implements org.hibernate.metamodel.mapping.NaturalIdMapping.verifyFlushState.

Verify the natural-id value(s) we are about to flush to the database
public void
Inherited from org.hibernate.metamodel.mapping.internal.AbstractNaturalIdMapping:
findContainingEntityMappinggetCacheAccessgetDeclaringTypegetNavigableRoleisMutable