Search in sources :

Example 6 with SqlTuple

use of org.hibernate.sql.ast.tree.expression.SqlTuple in project hibernate-orm by hibernate.

the class AbstractSqlAstTranslator method renderCommaSeparatedSelectExpression.

protected final void renderCommaSeparatedSelectExpression(Iterable<? extends SqlAstNode> expressions, Iterable<String> aliases) {
    String separator = NO_SEPARATOR;
    final Iterator<String> aliasIterator = aliases.iterator();
    for (SqlAstNode expression : expressions) {
        final SqlTuple sqlTuple = SqlTupleContainer.getSqlTuple(expression);
        if (sqlTuple != null) {
            for (Expression e : sqlTuple.getExpressions()) {
                appendSql(separator);
                renderSelectExpression(e);
                separator = COMA_SEPARATOR;
            }
        } else if (expression instanceof Expression) {
            appendSql(separator);
            renderSelectExpression((Expression) expression);
        } else {
            appendSql(separator);
            expression.accept(this);
        }
        separator = COMA_SEPARATOR;
        append(WHITESPACE);
        append(aliasIterator.next());
    }
}
Also used : Expression(org.hibernate.sql.ast.tree.expression.Expression) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) OrderedSetAggregateFunctionExpression(org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) SqlAstNode(org.hibernate.sql.ast.tree.SqlAstNode)

Example 7 with SqlTuple

use of org.hibernate.sql.ast.tree.expression.SqlTuple in project hibernate-orm by hibernate.

the class AbstractSqlAstTranslator method visitRelationalPredicate.

@Override
public void visitRelationalPredicate(ComparisonPredicate comparisonPredicate) {
    // todo (6.0) : do we want to allow multi-valued parameters in a relational predicate?
    // yes means we'd have to support dynamically converting this predicate into
    // an IN predicate or an OR predicate
    // 
    // NOTE: JPA does not define support for multi-valued parameters here.
    // 
    // If we decide to support that ^^  we should validate that *both* sides of the
    // predicate are multi-valued parameters.  because...
    // well... its stupid :)
    final SqlTuple lhsTuple;
    final SqlTuple rhsTuple;
    if ((lhsTuple = SqlTupleContainer.getSqlTuple(comparisonPredicate.getLeftHandExpression())) != null) {
        final Expression rhsExpression = comparisonPredicate.getRightHandExpression();
        final boolean all;
        final QueryPart subquery;
        // Handle emulation of quantified comparison
        if (rhsExpression instanceof QueryPart) {
            subquery = (QueryPart) rhsExpression;
            all = true;
        } else if (rhsExpression instanceof Every) {
            subquery = ((Every) rhsExpression).getSubquery();
            all = true;
        } else if (rhsExpression instanceof Any) {
            subquery = ((Any) rhsExpression).getSubquery();
            all = false;
        } else {
            subquery = null;
            all = false;
        }
        final ComparisonOperator operator = comparisonPredicate.getOperator();
        if (lhsTuple.getExpressions().size() == 1) {
            // Special case for tuples with arity 1 as any DBMS supports scalar IN predicates
            if (subquery == null) {
                renderComparison(lhsTuple.getExpressions().get(0), operator, SqlTupleContainer.getSqlTuple(comparisonPredicate.getRightHandExpression()).getExpressions().get(0));
            } else {
                renderComparison(lhsTuple.getExpressions().get(0), operator, rhsExpression);
            }
        } else if (subquery != null && !supportsRowValueConstructorSyntaxInQuantifiedPredicates()) {
            // For quantified relational comparisons, we can do an optimized emulation
            if (supportsRowValueConstructorSyntax() && all) {
                switch(operator) {
                    case LESS_THAN:
                    case LESS_THAN_OR_EQUAL:
                    case GREATER_THAN:
                    case GREATER_THAN_OR_EQUAL:
                        {
                            emulateQuantifiedTupleSubQueryPredicate(comparisonPredicate, subquery, lhsTuple, operator);
                            return;
                        }
                }
            }
            emulateSubQueryRelationalRestrictionPredicate(comparisonPredicate, all, subquery, lhsTuple, this::renderSelectTupleComparison, all ? operator.negated() : operator);
        } else if (!supportsRowValueConstructorSyntax()) {
            rhsTuple = SqlTupleContainer.getSqlTuple(rhsExpression);
            assert rhsTuple != null;
            // Some DBs like Oracle support tuples only for the IN subquery predicate
            if ((operator == ComparisonOperator.EQUAL || operator == ComparisonOperator.NOT_EQUAL) && supportsRowValueConstructorSyntaxInInSubQuery()) {
                comparisonPredicate.getLeftHandExpression().accept(this);
                if (operator == ComparisonOperator.NOT_EQUAL) {
                    appendSql(" not");
                }
                appendSql(" in(");
                renderExpressionsAsSubquery(rhsTuple.getExpressions());
                appendSql(CLOSE_PARENTHESIS);
            } else {
                emulateTupleComparison(lhsTuple.getExpressions(), rhsTuple.getExpressions(), operator, true);
            }
        } else {
            renderComparison(comparisonPredicate.getLeftHandExpression(), operator, rhsExpression);
        }
    } else if ((rhsTuple = SqlTupleContainer.getSqlTuple(comparisonPredicate.getRightHandExpression())) != null) {
        final Expression lhsExpression = comparisonPredicate.getLeftHandExpression();
        if (lhsExpression instanceof QueryGroup) {
            if (rhsTuple.getExpressions().size() == 1) {
                // Special case for tuples with arity 1 as any DBMS supports scalar IN predicates
                renderComparison(lhsExpression, comparisonPredicate.getOperator(), rhsTuple.getExpressions().get(0));
            } else if (supportsRowValueConstructorSyntax()) {
                renderComparison(lhsExpression, comparisonPredicate.getOperator(), comparisonPredicate.getRightHandExpression());
            } else {
                emulateSubQueryRelationalRestrictionPredicate(comparisonPredicate, false, (QueryGroup) lhsExpression, rhsTuple, this::renderSelectTupleComparison, // Since we switch the order of operands, we have to invert the operator
                comparisonPredicate.getOperator().invert());
            }
        } else {
            throw new IllegalStateException("Unsupported tuple comparison combination. LHS is neither a tuple nor a tuple subquery but RHS is a tuple: " + comparisonPredicate);
        }
    } else {
        renderComparison(comparisonPredicate.getLeftHandExpression(), comparisonPredicate.getOperator(), comparisonPredicate.getRightHandExpression());
    }
}
Also used : ComparisonOperator(org.hibernate.query.sqm.ComparisonOperator) Expression(org.hibernate.sql.ast.tree.expression.Expression) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) OrderedSetAggregateFunctionExpression(org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) QueryPart(org.hibernate.sql.ast.tree.select.QueryPart) Every(org.hibernate.sql.ast.tree.expression.Every) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) Any(org.hibernate.sql.ast.tree.expression.Any) QueryGroup(org.hibernate.sql.ast.tree.select.QueryGroup)

Example 8 with SqlTuple

use of org.hibernate.sql.ast.tree.expression.SqlTuple in project hibernate-orm by hibernate.

the class LoaderSelectBuilder method applyRestriction.

private void applyRestriction(QuerySpec rootQuerySpec, NavigablePath rootNavigablePath, TableGroup rootTableGroup, ModelPart modelPart, int numberColumns, Consumer<JdbcParameter> jdbcParameterConsumer, LoaderSqlAstCreationState sqlAstCreationState) {
    final SqlExpressionResolver sqlExpressionResolver = sqlAstCreationState.getSqlExpressionResolver();
    final NavigablePath navigablePath = rootNavigablePath.append(modelPart.getNavigableRole().getNavigableName());
    if (numberColumns == 1) {
        modelPart.forEachSelectable((columnIndex, selection) -> {
            final TableReference tableReference = rootTableGroup.resolveTableReference(navigablePath, selection.getContainingTableExpression());
            final ColumnReference columnRef = (ColumnReference) sqlExpressionResolver.resolveSqlExpression(createColumnReferenceKey(tableReference, selection.getSelectionExpression()), p -> new ColumnReference(tableReference, selection, creationContext.getSessionFactory()));
            if (numberOfKeysToLoad == 1) {
                final JdbcParameter jdbcParameter = new JdbcParameterImpl(selection.getJdbcMapping());
                jdbcParameterConsumer.accept(jdbcParameter);
                rootQuerySpec.applyPredicate(new ComparisonPredicate(columnRef, ComparisonOperator.EQUAL, jdbcParameter));
            } else {
                final InListPredicate predicate = new InListPredicate(columnRef);
                for (int i = 0; i < numberOfKeysToLoad; i++) {
                    for (int j = 0; j < numberColumns; j++) {
                        final JdbcParameter jdbcParameter = new JdbcParameterImpl(columnRef.getJdbcMapping());
                        jdbcParameterConsumer.accept(jdbcParameter);
                        predicate.addExpression(jdbcParameter);
                    }
                }
                rootQuerySpec.applyPredicate(predicate);
            }
        });
    } else {
        final List<ColumnReference> columnReferences = new ArrayList<>(numberColumns);
        modelPart.forEachSelectable((columnIndex, selection) -> {
            final TableReference tableReference = rootTableGroup.resolveTableReference(navigablePath, selection.getContainingTableExpression());
            columnReferences.add((ColumnReference) sqlExpressionResolver.resolveSqlExpression(createColumnReferenceKey(tableReference, selection.getSelectionExpression()), p -> new ColumnReference(tableReference, selection, creationContext.getSessionFactory())));
        });
        final SqlTuple tuple = new SqlTuple(columnReferences, modelPart);
        final InListPredicate predicate = new InListPredicate(tuple);
        for (int i = 0; i < numberOfKeysToLoad; i++) {
            final List<JdbcParameter> tupleParams = new ArrayList<>(numberColumns);
            for (int j = 0; j < numberColumns; j++) {
                final ColumnReference columnReference = columnReferences.get(j);
                final JdbcParameter jdbcParameter = new JdbcParameterImpl(columnReference.getJdbcMapping());
                jdbcParameterConsumer.accept(jdbcParameter);
                tupleParams.add(jdbcParameter);
            }
            final SqlTuple paramTuple = new SqlTuple(tupleParams, modelPart);
            predicate.addExpression(paramTuple);
        }
        rootQuerySpec.applyPredicate(predicate);
    }
}
Also used : Arrays(java.util.Arrays) CollectionFetch(org.hibernate.sql.results.graph.collection.internal.CollectionFetch) CollectionDomainResult(org.hibernate.sql.results.graph.collection.internal.CollectionDomainResult) GraphSemantic(org.hibernate.graph.GraphSemantic) ResultsHelper.attributeName(org.hibernate.query.results.ResultsHelper.attributeName) TableGroupJoin(org.hibernate.sql.ast.tree.from.TableGroupJoin) CascadingAction(org.hibernate.engine.spi.CascadingAction) EntityValuedModelPart(org.hibernate.metamodel.mapping.EntityValuedModelPart) EntityResultImpl(org.hibernate.sql.results.graph.entity.internal.EntityResultImpl) SqlAstCreationContext(org.hibernate.sql.ast.spi.SqlAstCreationContext) BagSemantics(org.hibernate.collection.spi.BagSemantics) FetchableContainer(org.hibernate.sql.results.graph.FetchableContainer) PluralAttributeMapping(org.hibernate.metamodel.mapping.PluralAttributeMapping) ComparisonPredicate(org.hibernate.sql.ast.tree.predicate.ComparisonPredicate) BiDirectionalFetch(org.hibernate.sql.results.graph.BiDirectionalFetch) ForeignKeyDescriptor(org.hibernate.metamodel.mapping.ForeignKeyDescriptor) Map(java.util.Map) FetchProfile(org.hibernate.engine.profile.FetchProfile) JdbcParameterImpl(org.hibernate.sql.exec.internal.JdbcParameterImpl) ComparisonOperator(org.hibernate.query.sqm.ComparisonOperator) SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) CollectionPart(org.hibernate.metamodel.mapping.CollectionPart) EntityValuedFetchable(org.hibernate.sql.results.graph.entity.EntityValuedFetchable) InSubQueryPredicate(org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate) Fetchable(org.hibernate.sql.results.graph.Fetchable) TableGroupJoinProducer(org.hibernate.sql.ast.tree.from.TableGroupJoinProducer) LockOptions(org.hibernate.LockOptions) NavigablePath(org.hibernate.query.spi.NavigablePath) AliasCollector(org.hibernate.sql.ast.spi.AliasCollector) DomainResult(org.hibernate.sql.results.graph.DomainResult) Expression(org.hibernate.sql.ast.tree.expression.Expression) OrderByFragment(org.hibernate.metamodel.mapping.ordering.OrderByFragment) SimpleFromClauseAccessImpl(org.hibernate.sql.ast.spi.SimpleFromClauseAccessImpl) SqlExpressionResolver(org.hibernate.sql.ast.spi.SqlExpressionResolver) Objects(java.util.Objects) EntityIdentifierMapping(org.hibernate.metamodel.mapping.EntityIdentifierMapping) SelectStatement(org.hibernate.sql.ast.tree.select.SelectStatement) LoadQueryInfluencers(org.hibernate.engine.spi.LoadQueryInfluencers) List(java.util.List) CascadeStyle(org.hibernate.engine.spi.CascadeStyle) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) QuerySpec(org.hibernate.sql.ast.tree.select.QuerySpec) SubselectFetch(org.hibernate.engine.spi.SubselectFetch) SimpleForeignKeyDescriptor(org.hibernate.metamodel.mapping.internal.SimpleForeignKeyDescriptor) EmbeddedAttributeMapping(org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping) SqlExpressionResolver.createColumnReferenceKey(org.hibernate.sql.ast.spi.SqlExpressionResolver.createColumnReferenceKey) FetchParent(org.hibernate.sql.results.graph.FetchParent) BasicValuedModelPart(org.hibernate.metamodel.mapping.BasicValuedModelPart) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) Logger(org.jboss.logging.Logger) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference) ArrayList(java.util.ArrayList) RootGraphImplementor(org.hibernate.graph.spi.RootGraphImplementor) TableReference(org.hibernate.sql.ast.tree.from.TableReference) ModelPart(org.hibernate.metamodel.mapping.ModelPart) Loader(org.hibernate.loader.ast.spi.Loader) BiConsumer(java.util.function.BiConsumer) EntityIdentifierNavigablePath(org.hibernate.query.sqm.spi.EntityIdentifierNavigablePath) SqlAliasBaseManager(org.hibernate.sql.ast.spi.SqlAliasBaseManager) SqlAstCreationState(org.hibernate.sql.ast.spi.SqlAstCreationState) FetchTiming(org.hibernate.engine.FetchTiming) Loadable(org.hibernate.loader.ast.spi.Loadable) Fetch(org.hibernate.sql.results.graph.Fetch) Consumer(java.util.function.Consumer) Restrictable(org.hibernate.metamodel.mapping.Restrictable) EntityGraphTraversalState(org.hibernate.sql.results.graph.EntityGraphTraversalState) FetchStyle(org.hibernate.engine.FetchStyle) StandardEntityGraphTraversalStateImpl(org.hibernate.sql.results.internal.StandardEntityGraphTraversalStateImpl) AbstractMap(java.util.AbstractMap) JdbcParameter(org.hibernate.sql.ast.tree.expression.JdbcParameter) FromClauseAccess(org.hibernate.sql.ast.spi.FromClauseAccess) QueryPart(org.hibernate.sql.ast.tree.select.QueryPart) SqlAstJoinType(org.hibernate.sql.ast.SqlAstJoinType) NaturalIdMapping(org.hibernate.metamodel.mapping.NaturalIdMapping) SqlSelectionImpl(org.hibernate.sql.results.internal.SqlSelectionImpl) NonAggregatedIdentifierMapping(org.hibernate.metamodel.mapping.NonAggregatedIdentifierMapping) AttributeMapping(org.hibernate.metamodel.mapping.AttributeMapping) Collections(java.util.Collections) TableGroup(org.hibernate.sql.ast.tree.from.TableGroup) EffectiveEntityGraph(org.hibernate.engine.spi.EffectiveEntityGraph) PluralTableGroup(org.hibernate.sql.ast.tree.from.PluralTableGroup) NavigablePath(org.hibernate.query.spi.NavigablePath) EntityIdentifierNavigablePath(org.hibernate.query.sqm.spi.EntityIdentifierNavigablePath) JdbcParameter(org.hibernate.sql.ast.tree.expression.JdbcParameter) ArrayList(java.util.ArrayList) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) ComparisonPredicate(org.hibernate.sql.ast.tree.predicate.ComparisonPredicate) TableReference(org.hibernate.sql.ast.tree.from.TableReference) SqlExpressionResolver(org.hibernate.sql.ast.spi.SqlExpressionResolver) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) JdbcParameterImpl(org.hibernate.sql.exec.internal.JdbcParameterImpl) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference)

Example 9 with SqlTuple

use of org.hibernate.sql.ast.tree.expression.SqlTuple in project hibernate-orm by hibernate.

the class InPredicateRestrictionProducer method produceRestriction.

@Override
public InListPredicate produceRestriction(List<?> matchingIdValues, EntityMappingType entityDescriptor, int valueIndex, ModelPart valueModelPart, TableReference mutatingTableReference, Supplier<Consumer<SelectableConsumer>> columnsToMatchVisitationSupplier, ExecutionContext executionContext) {
    assert matchingIdValues != null;
    assert !matchingIdValues.isEmpty();
    final SessionFactoryImplementor sessionFactory = executionContext.getSession().getFactory();
    final EntityIdentifierMapping identifierMapping = entityDescriptor.getIdentifierMapping();
    final int idColumnCount = identifierMapping.getJdbcTypeCount();
    assert idColumnCount > 0;
    final InListPredicate predicate;
    if (idColumnCount == 1) {
        final BasicValuedModelPart basicIdMapping = (BasicValuedModelPart) identifierMapping;
        final String idColumn = basicIdMapping.getSelectionExpression();
        final Expression inFixture = new ColumnReference(mutatingTableReference, idColumn, // id columns cannot be formulas and cannot have custom read and write expressions
        false, null, null, basicIdMapping.getJdbcMapping(), sessionFactory);
        predicate = new InListPredicate(inFixture);
        matchingIdValues.forEach(matchingId -> predicate.addExpression(new JdbcLiteral<>(matchingId, basicIdMapping.getJdbcMapping())));
    } else {
        final List<ColumnReference> columnReferences = new ArrayList<>(idColumnCount);
        final List<JdbcMapping> jdbcMappings = new ArrayList<>(idColumnCount);
        identifierMapping.forEachSelectable((columnIndex, selection) -> {
            columnReferences.add(new ColumnReference(mutatingTableReference, selection, sessionFactory));
            jdbcMappings.add(selection.getJdbcMapping());
        });
        final Expression inFixture = new SqlTuple(columnReferences, identifierMapping);
        predicate = new InListPredicate(inFixture);
        matchingIdValues.forEach(matchingId -> {
            assert matchingId instanceof Object[];
            final Object[] matchingIdParts = (Object[]) matchingId;
            final List<JdbcLiteral<?>> tupleParts = new ArrayList<>(idColumnCount);
            for (int p = 0; p < matchingIdParts.length; p++) {
                tupleParts.add(new JdbcLiteral<>(matchingIdParts[p], jdbcMappings.get(p)));
            }
            predicate.addExpression(new SqlTuple(tupleParts, identifierMapping));
        });
    }
    return predicate;
}
Also used : BasicValuedModelPart(org.hibernate.metamodel.mapping.BasicValuedModelPart) JdbcMapping(org.hibernate.metamodel.mapping.JdbcMapping) SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) ArrayList(java.util.ArrayList) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) Expression(org.hibernate.sql.ast.tree.expression.Expression) EntityIdentifierMapping(org.hibernate.metamodel.mapping.EntityIdentifierMapping) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference) JdbcLiteral(org.hibernate.sql.ast.tree.expression.JdbcLiteral)

Example 10 with SqlTuple

use of org.hibernate.sql.ast.tree.expression.SqlTuple in project hibernate-orm by hibernate.

the class AbstractCteMutationHandler method createIdSubQueryPredicate.

protected Predicate createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory) {
    final NamedTableReference idSelectTableReference = new NamedTableReference(idSelectCte.getCteTable().getTableExpression(), CTE_TABLE_IDENTIFIER, false, factory);
    final Junction predicate = new Junction(Junction.Nature.CONJUNCTION);
    final List<CteColumn> cteColumns = idSelectCte.getCteTable().getCteColumns();
    final int size = lhsExpressions.size();
    final QuerySpec subQuery = new QuerySpec(false, 1);
    subQuery.getFromClause().addRoot(new CteTableGroup(idSelectTableReference));
    final SelectClause subQuerySelectClause = subQuery.getSelectClause();
    if (fkModelPart == null) {
        for (int i = 0; i < size; i++) {
            final CteColumn cteColumn = cteColumns.get(i);
            subQuerySelectClause.addSqlSelection(new SqlSelectionImpl(i + 1, i, new ColumnReference(idSelectTableReference, cteColumn.getColumnExpression(), cteColumn.getJdbcMapping(), factory)));
        }
    } else {
        fkModelPart.forEachSelectable((selectionIndex, selectableMapping) -> {
            subQuerySelectClause.addSqlSelection(new SqlSelectionImpl(selectionIndex + 1, selectionIndex, new ColumnReference(idSelectTableReference, selectableMapping.getSelectionExpression(), selectableMapping.getJdbcMapping(), factory)));
        });
    }
    final Expression lhs;
    if (lhsExpressions.size() == 1) {
        lhs = lhsExpressions.get(0);
    } else {
        lhs = new SqlTuple(lhsExpressions, null);
    }
    predicate.add(new InSubQueryPredicate(lhs, subQuery, false));
    return predicate;
}
Also used : CteColumn(org.hibernate.sql.ast.tree.cte.CteColumn) SelectClause(org.hibernate.sql.ast.tree.select.SelectClause) NamedTableReference(org.hibernate.sql.ast.tree.from.NamedTableReference) InSubQueryPredicate(org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate) CteTableGroup(org.hibernate.sql.ast.tree.cte.CteTableGroup) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) Junction(org.hibernate.sql.ast.tree.predicate.Junction) SqlSelectionImpl(org.hibernate.sql.results.internal.SqlSelectionImpl) QuerySpec(org.hibernate.sql.ast.tree.select.QuerySpec) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference)

Aggregations

SqlTuple (org.hibernate.sql.ast.tree.expression.SqlTuple)34 Expression (org.hibernate.sql.ast.tree.expression.Expression)30 ColumnReference (org.hibernate.sql.ast.tree.expression.ColumnReference)20 ArrayList (java.util.ArrayList)17 SqlSelectionExpression (org.hibernate.sql.ast.tree.expression.SqlSelectionExpression)15 BinaryArithmeticExpression (org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression)14 CaseSearchedExpression (org.hibernate.sql.ast.tree.expression.CaseSearchedExpression)14 CaseSimpleExpression (org.hibernate.sql.ast.tree.expression.CaseSimpleExpression)14 ModifiedSubQueryExpression (org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression)14 SelfRenderingExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingExpression)14 NavigablePath (org.hibernate.query.spi.NavigablePath)12 TableReference (org.hibernate.sql.ast.tree.from.TableReference)11 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)10 ModelPart (org.hibernate.metamodel.mapping.ModelPart)10 TableGroup (org.hibernate.sql.ast.tree.from.TableGroup)10 List (java.util.List)9 BasicValuedModelPart (org.hibernate.metamodel.mapping.BasicValuedModelPart)9 PluralAttributeMapping (org.hibernate.metamodel.mapping.PluralAttributeMapping)9 QuerySpec (org.hibernate.sql.ast.tree.select.QuerySpec)9 SqlSelectionImpl (org.hibernate.sql.results.internal.SqlSelectionImpl)9