Package org.hibernate.sql.ast.tree.from
Class StandardVirtualTableGroup
java.lang.Object
org.hibernate.sql.ast.tree.from.AbstractColumnReferenceQualifier
org.hibernate.sql.ast.tree.from.AbstractTableGroup
org.hibernate.sql.ast.tree.from.StandardVirtualTableGroup
- All Implemented Interfaces:
DomainResultProducer,SqmPathInterpretation,SqlSelectionProducer,Expression,ColumnReferenceQualifier,TableGroup,VirtualTableGroup,SqlAstNode
-
Constructor Summary
ConstructorsConstructorDescriptionStandardVirtualTableGroup(NavigablePath navigablePath, ModelPartContainer modelPart, TableGroup underlyingTableGroup, boolean fetched) -
Method Summary
Modifier and TypeMethodDescriptionvoidA nested table group join is a join against a table group, that is ensured to be joined against the primary table reference and table reference joins in isolation, prior to doing other table group joins e.g.voidvoidapplyAffectedTableNames(Consumer<String> nameCollector) booleanThe type for this expressiongetTableReference(NavigablePath navigablePath, String tableExpression, boolean resolve) Returns the table reference for the table expression, or null if not found.getTableReference(NavigablePath navigablePath, ValuedModelPart modelPart, String tableExpression, boolean resolve) booleanvoidprependTableGroupJoin(NavigablePath navigablePath, TableGroupJoin join) Adds the given table group join before a join as found via the given navigable path.Methods inherited from class org.hibernate.sql.ast.tree.from.AbstractTableGroup
getGroupAlias, getModelPart, getNavigablePath, getNestedTableGroupJoins, getSessionFactory, getSqlAliasBase, getTableGroupJoins, isRealTableGroup, toString, visitNestedTableGroupJoins, visitTableGroupJoinsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier
getTableReference, getTableReference, resolveTableReference, resolveTableReference, resolveTableReferenceMethods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReferenceMethods inherited from interface org.hibernate.query.sqm.sql.internal.SqmPathInterpretation
getAffectedTableName, getSqlExpressionMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroup
accept, applySqlSelections, createDomainResult, findCompatibleJoin, findCompatibleJoinedGroup, findTableGroupJoin, findTableReference, getGroupAlias, getModelPart, getNavigablePath, getNestedTableGroupJoins, getTableGroupJoins, hasRealJoins, isInitialized, isLateral, isRealTableGroup, visitNestedTableGroupJoins, visitTableGroupJoinsMethods inherited from interface org.hibernate.sql.ast.tree.from.VirtualTableGroup
isVirtual
-
Constructor Details
-
Method Details
-
getExpressionType
Description copied from interface:ExpressionThe type for this expression- Specified by:
getExpressionTypein interfaceExpression- Specified by:
getExpressionTypein interfaceSqmPathInterpretation- Overrides:
getExpressionTypein classAbstractTableGroup
-
getUnderlyingTableGroup
- Specified by:
getUnderlyingTableGroupin interfaceVirtualTableGroup
-
isFetched
public boolean isFetched()- Specified by:
isFetchedin interfaceTableGroup
-
getSourceAlias
- Specified by:
getSourceAliasin interfaceTableGroup- Overrides:
getSourceAliasin classAbstractTableGroup
-
canUseInnerJoins
public boolean canUseInnerJoins()- Specified by:
canUseInnerJoinsin interfaceTableGroup- Overrides:
canUseInnerJoinsin classAbstractTableGroup
-
applyAffectedTableNames
- Specified by:
applyAffectedTableNamesin interfaceTableGroup
-
getPrimaryTableReference
- Specified by:
getPrimaryTableReferencein interfaceTableGroup- Specified by:
getPrimaryTableReferencein classAbstractColumnReferenceQualifier
-
getTableReferenceJoins
- Specified by:
getTableReferenceJoinsin interfaceTableGroup- Specified by:
getTableReferenceJoinsin classAbstractColumnReferenceQualifier
-
addTableGroupJoin
- Specified by:
addTableGroupJoinin interfaceTableGroup- Overrides:
addTableGroupJoinin classAbstractTableGroup
-
addNestedTableGroupJoin
Description copied from interface:TableGroupA nested table group join is a join against a table group, that is ensured to be joined against the primary table reference and table reference joins in isolation, prior to doing other table group joins e.g.select * from entity1 e left join ( collection_table c1 join association a on a.id = c1.target_id ) on c1.entity_id = e.id and c1.key = 1is modeled asTableGroup( primaryTableReference = TableReference(entity1, e), tableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(collection_table, c1), nestedTableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(association, a) ) ) ] ) ) ] )This is necessary to correctly retain the cardinality of an HQL join like e.g.from Entity1 e left join e.collectionAssociation c on key(c) = 1- Specified by:
addNestedTableGroupJoinin interfaceTableGroup- Overrides:
addNestedTableGroupJoinin classAbstractTableGroup
-