Top Fields Constructors Methods
org.hibernate.query.derived

public Class AnonymousTupleEmbeddableValuedModelPart

extends Object
implements EmbeddableValuedModelPart, EmbeddableMappingType
Class Inheritance
All Implemented Interfaces
org.hibernate.metamodel.mapping.EmbeddableMappingType, org.hibernate.metamodel.mapping.SelectableMappings, org.hibernate.metamodel.mapping.ManagedMappingType, 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, org.hibernate.metamodel.mapping.EmbeddableValuedModelPart, org.hibernate.sql.ast.tree.from.TableGroupJoinProducer, org.hibernate.sql.ast.tree.from.TableGroupProducer, org.hibernate.sql.results.graph.Fetchable, org.hibernate.metamodel.mapping.ValuedModelPart, org.hibernate.metamodel.mapping.ValueMapping, org.hibernate.type.descriptor.java.JavaTypedExpressible
Known Direct Subclasses
org.hibernate.query.derived.AnonymousTupleEmbeddedEntityIdentifierMapping, org.hibernate.query.derived.AnonymousTupleNonAggregatedEntityIdentifierMapping
Annotations
@Incubating
Imports
java.util.ArrayList, .List, .Map, .Set, java.util.function.BiConsumer, .Consumer, org.hibernate.Incubating, org.hibernate.cache.MutableCacheKeyBuilder, org.hibernate.engine.FetchStyle, .FetchTiming, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.internal.util.IndexedConsumer, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.metamodel.mapping.AttributeMapping, .AttributeMappingsList, .EmbeddableMappingType, .EmbeddableValuedModelPart, .EntityMappingType, .JdbcMapping, .ModelPart, .SelectableConsumer, .SelectableMapping, .SelectableMappings, org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping, .MappingModelCreationProcess, org.hibernate.metamodel.model.domain.DomainType, .NavigableRole, .SingularPersistentAttribute, org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy, org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.sqm.sql.SqmToSqlAstConverter, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.Clause, .SqlAstJoinType, org.hibernate.sql.ast.spi.SqlAliasBase, .SqlAstCreationState, .SqlSelection, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, .SqlTuple, org.hibernate.sql.ast.tree.from.StandardVirtualTableGroup, .TableGroup, .TableGroupJoin, .TableGroupProducer, .TableReference, org.hibernate.sql.ast.tree.predicate.Predicate, org.hibernate.sql.results.graph.DomainResult, .DomainResultCreationState, .Fetch, .FetchOptions, .FetchParent, .Fetchable, org.hibernate.sql.results.graph.embeddable.internal.EmbeddableResultImpl, org.hibernate.type.descriptor.java.JavaType, jakarta.persistence.metamodel.Attribute

Author
Christian Beikov

Field Summary

Modifier and TypeField and Description
private final String
private final DomainType<?>
private final EmbeddableValuedModelPart
private static final FetchOptions
private final int
private final Map<String, ModelPart>
private final ModelPart[]

Constructor Summary

AccessConstructor and Description
public
AnonymousTupleEmbeddableValuedModelPart(SqmExpressible<?> sqmExpressible, List<SqlSelection> sqlSelections, int selectionIndex, String selectionExpression, Set<String> compatibleTableExpressions, Set<Attribute<?, ?>> attributes, DomainType<?> domainType, String componentName, EmbeddableValuedModelPart existingModelPartContainer, int fetchableIndex)

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
)

Overrides default org.hibernate.metamodel.mapping.EmbeddableValuedModelPart.addToCacheKey.

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)

Overrides default org.hibernate.metamodel.mapping.EmbeddableMappingType.applySqlSelections.

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)

Overrides default org.hibernate.metamodel.mapping.EmbeddableMappingType.applySqlSelections.

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 <X, Y> int
breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session)

Overrides default org.hibernate.metamodel.mapping.EmbeddableValuedModelPart.breakDownJdbcValues.

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

Breaks down the domain value to its constituent JDBC values.
public <T> DomainResult<T>
createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)

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

Create a DomainResult for a specific reference to this ModelPart.
public EmbeddableMappingType
private Map<String, ModelPart>
createModelParts(SqmExpressible<?> sqmExpressible, List<SqlSelection> sqlSelections, int selectionIndex, String selectionExpression, Set<String> compatibleTableExpressions, Set<Attribute<?, ?>> attributes, EmbeddableValuedModelPart modelPartContainer)

public TableGroup
createRootTableGroupJoin(NavigablePath
The NavigablePath to the join
navigablePath
,
TableGroup
The join's (L)eft-(H)and (S)ide
lhs
,
String explicitSourceAlias, SqlAliasBase
A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
explicitSqlAliasBase
,
SqlAstJoinType
An explicit join-type. May be null to signal that the join is for an implicit path.
sqlAstJoinType
,
boolean fetched, Consumer<Predicate>
Consumer for additional predicates from the producer's mapping.
predicateConsumer
,
SqlAstCreationState creationState)

Implements org.hibernate.sql.ast.tree.from.TableGroupJoinProducer.createRootTableGroupJoin.

Create the "join", but return a TableGroup.
public TableGroupJoin
createTableGroupJoin(NavigablePath
The NavigablePath to the join
navigablePath
,
TableGroup
The join's (L)eft-(H)and (S)ide
lhs
,
String explicitSourceAlias, SqlAliasBase
A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
explicitSqlAliasBase
,
SqlAstJoinType
An explicit join-type. May be null to signal that the join is for an implicit path.
requestedJoinType
,
boolean fetched, boolean
Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause)
addsPredicate
,
SqlAstCreationState creationState)

Implements org.hibernate.sql.ast.tree.from.TableGroupJoinProducer.createTableGroupJoin.

Create a TableGroupJoin.
public <X, Y> int
public Object
public EntityMappingType
public ModelPart
public void
forEachAttributeMapping(Consumer<? super AttributeMapping> action)

Implements org.hibernate.metamodel.mapping.ManagedMappingType.forEachAttributeMapping.

Visit attributes defined on this class and any supers
public <X, Y> int
public void
public int
public <X, Y> int
forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> consumer, SharedSessionContractImplementor session)

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

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

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

Implements org.hibernate.metamodel.mapping.EmbeddableMappingType.forEachSelectable.

Visits each selectable mapping with the selectable index offset by the given value.
public void
public void
public Fetch
generateFetch(FetchParent
The parent of the Fetch we are generating
fetchParent
,
NavigablePath
The overall path within the graph
fetchablePath
,
FetchTiming
The requested fetch timing
fetchTiming
,
boolean selected, String resultVariable, DomainResultCreationState creationState)

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

Generates a Fetch of this fetchable
public AttributeMapping
getAttributeMapping(int position)

Implements org.hibernate.metamodel.mapping.ManagedMappingType.getAttributeMapping.

Retrieve an attribute by its contributor position
public AttributeMappingsList
getAttributeMappings()

Implements org.hibernate.metamodel.mapping.ManagedMappingType.getAttributeMappings.

Get access to the attributes defined on this class and any supers
public String
getContainingTableExpression()

Implements org.hibernate.metamodel.mapping.ValuedModelPart.getContainingTableExpression.

The table which contains the columns mapped by this value
public SqlAstJoinType
public EmbeddableMappingType
public EmbeddableValuedModelPart
public Fetchable
public int
public String
public JavaType<?>
public JdbcMapping
public int
public FetchOptions
public JavaType<?>
public NavigableRole
public int
getNumberOfAttributeMappings()

Implements org.hibernate.metamodel.mapping.ManagedMappingType.getNumberOfAttributeMappings.

Get the number of attributes defined on this class and any supers
public int
public String
getPartName()

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

The local part name, which is generally the unqualified role name
public EmbeddableRepresentationStrategy
public SelectableMapping
public int
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 Object
getValue(Object instance, int position)

Overrides default org.hibernate.metamodel.mapping.ManagedMappingType.getValue.

Extract a specific attribute value from the entity instance, by position
public Object[]
getValues(Object instance)

Implements org.hibernate.metamodel.mapping.ManagedMappingType.getValues.

Extract the individual attribute values from the entity instance
public boolean
public boolean
public boolean
isSimpleJoinPredicate(Predicate predicate)

Implements org.hibernate.sql.ast.tree.from.TableGroupJoinProducer.isSimpleJoinPredicate.

Returns whether the given predicate is a simple join predicate for this attribute.
public void
setValue(Object instance, int position, Object value)

Overrides default org.hibernate.metamodel.mapping.ManagedMappingType.setValue.

Inject a specific attribute value into the entity instance, by position
public void
setValues(Object instance, Object[] resolvedValues)

Implements org.hibernate.metamodel.mapping.ManagedMappingType.setValues.

Inject the attribute values into the entity instance
public SqlTuple
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait