Class AnonymousTupleTableGroupProducer
java.lang.Object
org.hibernate.query.sqm.tuple.internal.AnonymousTupleTableGroupProducer
- All Implemented Interfaces:
Bindable,JdbcMappingContainer,MappingModelExpressible,MappingType,ModelPart,ModelPartContainer,TableGroupProducer
- Direct Known Subclasses:
CteTupleTableGroupProducer
@Incubating
public class AnonymousTupleTableGroupProducer
extends Object
implements TableGroupProducer, MappingType
The table group producer for an anonymous tuple type.
Model part names are determined based on the tuple type component names.
The kind and type of the model parts is based on the type of the underlying selection.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Constructor Summary
ConstructorsConstructorDescriptionAnonymousTupleTableGroupProducer(AnonymousTupleType<?> tupleType, String aliasStem, SqlTypedMapping[] sqlTypedMappings, FromClauseAccess fromClauseAccess) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.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.<X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.<T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.static ModelPartcreateModelPart(MappingType mappingType, SqmExpressible<?> sqmExpressible, DomainType<?> domainType, SqlTypedMapping[] sqlTypedMappings, int selectionIndex, String selectionExpression, String partName, ModelPart existingModelPart, Set<String> compatibleTableExpressions, int fetchableIndex) disassemble(Object value, SharedSessionContractImplementor session) Breaks down a value ofJinto its simple pieces.findSubPart(String name, EntityMappingType treatTargetType) <X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor), but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping).intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offsetintforEachSelectable(int offset, SelectableConsumer consumer) Visits each selectable mapping with the selectable index offset by the given value.voidforEachSubPart(IndexedConsumer<ModelPart> consumer, EntityMappingType treatTarget) JavaType<?> The Java type for this part.getJdbcMapping(int index) intThe number of JDBC mappingsJavaType<?> The descriptor descriptor for the mapped Java typeThe type for this part.The local part name, which is generally the unqualified role nameGet the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedbooleanvoidvisitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, decompose, forEachSelectable, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference
-
Constructor Details
-
AnonymousTupleTableGroupProducer
public AnonymousTupleTableGroupProducer(AnonymousTupleType<?> tupleType, String aliasStem, SqlTypedMapping[] sqlTypedMappings, FromClauseAccess fromClauseAccess)
-
-
Method Details
-
createModelPart
public static ModelPart createModelPart(MappingType mappingType, SqmExpressible<?> sqmExpressible, DomainType<?> domainType, SqlTypedMapping[] sqlTypedMappings, int selectionIndex, String selectionExpression, String partName, ModelPart existingModelPart, Set<String> compatibleTableExpressions, int fetchableIndex) -
getColumnNames
-
getCompatibleTableExpressions
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceModelPart
-
getMappedJavaType
Description copied from interface:MappingTypeThe descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaTypein interfaceMappingType
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceModelPart
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceModelPart
-
findSubPart
- Specified by:
findSubPartin interfaceModelPartContainer
-
forEachSubPart
- Specified by:
forEachSubPartin interfaceModelPartContainer
-
visitSubParts
- Specified by:
visitSubPartsin interfaceModelPartContainer
-
getModelParts
-
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 generatedNote 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:
-
getJavaType
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceModelPart
-
forEachSelectable
Description copied from interface:ModelPartVisits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectablein interfaceModelPart
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
getJdbcTypeCount
public int getJdbcTypeCount()Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer
-