Search in sources :

Example 1 with InListPredicate

use of org.hibernate.sql.ast.tree.predicate.InListPredicate in project hibernate-orm by hibernate.

the class ExpressionReplacementWalker method visitInListPredicate.

@Override
public void visitInListPredicate(InListPredicate inListPredicate) {
    final Expression testExpression = replaceExpression(inListPredicate.getTestExpression());
    List<Expression> items = null;
    final List<Expression> listExpressions = inListPredicate.getListExpressions();
    for (int i = 0; i < listExpressions.size(); i++) {
        final Expression listExpression = listExpressions.get(i);
        final Expression newListExpression = replaceExpression(listExpression);
        if (newListExpression != listExpression) {
            if (items == null) {
                items = new ArrayList<>(listExpressions);
            }
            items.set(i, newListExpression);
        }
    }
    if (testExpression != inListPredicate.getTestExpression() || items != null) {
        returnedNode = new InListPredicate(testExpression, items == null ? listExpressions : items, inListPredicate.isNegated(), inListPredicate.getExpressionType());
    } else {
        returnedNode = inListPredicate;
    }
}
Also used : Expression(org.hibernate.sql.ast.tree.expression.Expression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate)

Example 2 with InListPredicate

use of org.hibernate.sql.ast.tree.predicate.InListPredicate 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 3 with InListPredicate

use of org.hibernate.sql.ast.tree.predicate.InListPredicate 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 4 with InListPredicate

use of org.hibernate.sql.ast.tree.predicate.InListPredicate in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method visitInListPredicate.

@Override
public Predicate visitInListPredicate(SqmInListPredicate<?> predicate) {
    // handling for "expansion"
    if (predicate.getListExpressions().size() == 1) {
        final SqmExpression<?> sqmExpression = predicate.getListExpressions().get(0);
        if (sqmExpression instanceof SqmParameter) {
            final SqmParameter<?> sqmParameter = (SqmParameter<?>) sqmExpression;
            if (sqmParameter.allowMultiValuedBinding()) {
                final Predicate specialCase = processInListWithSingleParameter(predicate, sqmParameter);
                if (specialCase != null) {
                    return specialCase;
                }
            }
        }
    }
    // otherwise - no special case...
    final FromClauseIndex fromClauseIndex = fromClauseIndexStack.getCurrent();
    inferrableTypeAccessStack.push(() -> {
        for (SqmExpression<?> listExpression : predicate.getListExpressions()) {
            final MappingModelExpressible<?> mapping = determineValueMapping(listExpression, fromClauseIndex);
            if (mapping != null) {
                return mapping;
            }
        }
        return null;
    });
    final Expression testExpression;
    try {
        testExpression = (Expression) predicate.getTestExpression().accept(this);
    } finally {
        inferrableTypeAccessStack.pop();
    }
    final InListPredicate inPredicate = new InListPredicate(testExpression, predicate.isNegated(), getBooleanType());
    inferrableTypeAccessStack.push(() -> determineValueMapping(predicate.getTestExpression(), fromClauseIndex));
    try {
        for (SqmExpression<?> expression : predicate.getListExpressions()) {
            inPredicate.addExpression((Expression) expression.accept(this));
        }
    } finally {
        inferrableTypeAccessStack.pop();
    }
    return inPredicate;
}
Also used : BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) SqmInListPredicate(org.hibernate.query.sqm.tree.predicate.SqmInListPredicate) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) SqmParameter(org.hibernate.query.sqm.tree.expression.SqmParameter) InSubQueryPredicate(org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate) SqmBooleanExpressionPredicate(org.hibernate.query.sqm.tree.predicate.SqmBooleanExpressionPredicate) SelfRenderingPredicate(org.hibernate.sql.ast.tree.predicate.SelfRenderingPredicate) NegatedPredicate(org.hibernate.sql.ast.tree.predicate.NegatedPredicate) LikePredicate(org.hibernate.sql.ast.tree.predicate.LikePredicate) BetweenPredicate(org.hibernate.sql.ast.tree.predicate.BetweenPredicate) SqmPredicate(org.hibernate.query.sqm.tree.predicate.SqmPredicate) SqmNegatedPredicate(org.hibernate.query.sqm.tree.predicate.SqmNegatedPredicate) ExistsPredicate(org.hibernate.sql.ast.tree.predicate.ExistsPredicate) SqmAndPredicate(org.hibernate.query.sqm.tree.predicate.SqmAndPredicate) SqmMemberOfPredicate(org.hibernate.query.sqm.tree.predicate.SqmMemberOfPredicate) SqmLikePredicate(org.hibernate.query.sqm.tree.predicate.SqmLikePredicate) SqmExistsPredicate(org.hibernate.query.sqm.tree.predicate.SqmExistsPredicate) SqmOrPredicate(org.hibernate.query.sqm.tree.predicate.SqmOrPredicate) SqmNullnessPredicate(org.hibernate.query.sqm.tree.predicate.SqmNullnessPredicate) SqmComparisonPredicate(org.hibernate.query.sqm.tree.predicate.SqmComparisonPredicate) SqmGroupedPredicate(org.hibernate.query.sqm.tree.predicate.SqmGroupedPredicate) SqmInListPredicate(org.hibernate.query.sqm.tree.predicate.SqmInListPredicate) ComparisonPredicate(org.hibernate.sql.ast.tree.predicate.ComparisonPredicate) NullnessPredicate(org.hibernate.sql.ast.tree.predicate.NullnessPredicate) SqmBetweenPredicate(org.hibernate.query.sqm.tree.predicate.SqmBetweenPredicate) GroupedPredicate(org.hibernate.sql.ast.tree.predicate.GroupedPredicate) BooleanExpressionPredicate(org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) SqmInSubQueryPredicate(org.hibernate.query.sqm.tree.predicate.SqmInSubQueryPredicate) SqmEmptinessPredicate(org.hibernate.query.sqm.tree.predicate.SqmEmptinessPredicate) Predicate(org.hibernate.sql.ast.tree.predicate.Predicate)

Example 5 with InListPredicate

use of org.hibernate.sql.ast.tree.predicate.InListPredicate in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method createTreatTypeRestriction.

private Predicate createTreatTypeRestriction(SqmPath<?> lhs, Set<String> subclassEntityNames) {
    final MappingMetamodel domainModel = creationContext.getSessionFactory().getRuntimeMetamodels().getMappingMetamodel();
    // Do what visitSelfInterpretingSqmPath does, except for calling preparingReusablePath
    // as that would register a type usage for the table group that we don't want here
    final DiscriminatorSqmPath discriminatorSqmPath = (DiscriminatorSqmPath) lhs.type();
    registerTypeUsage(discriminatorSqmPath);
    final Expression typeExpression = discriminatorSqmPath.interpret(this, this, jpaQueryComplianceEnabled);
    if (subclassEntityNames.size() == 1) {
        return new ComparisonPredicate(typeExpression, ComparisonOperator.EQUAL, new EntityTypeLiteral(domainModel.findEntityDescriptor(subclassEntityNames.iterator().next())));
    } else {
        final List<Expression> typeLiterals = new ArrayList<>(subclassEntityNames.size());
        for (String subclassEntityName : subclassEntityNames) {
            typeLiterals.add(new EntityTypeLiteral(domainModel.findEntityDescriptor(subclassEntityName)));
        }
        return new InListPredicate(typeExpression, typeLiterals);
    }
}
Also used : MappingMetamodel(org.hibernate.metamodel.MappingMetamodel) EntityTypeLiteral(org.hibernate.sql.ast.tree.expression.EntityTypeLiteral) DiscriminatorSqmPath(org.hibernate.metamodel.model.domain.internal.DiscriminatorSqmPath) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) ArrayList(java.util.ArrayList) SqmInListPredicate(org.hibernate.query.sqm.tree.predicate.SqmInListPredicate) InListPredicate(org.hibernate.sql.ast.tree.predicate.InListPredicate) SqmComparisonPredicate(org.hibernate.query.sqm.tree.predicate.SqmComparisonPredicate) ComparisonPredicate(org.hibernate.sql.ast.tree.predicate.ComparisonPredicate)

Aggregations

InListPredicate (org.hibernate.sql.ast.tree.predicate.InListPredicate)7 Expression (org.hibernate.sql.ast.tree.expression.Expression)6 ArrayList (java.util.ArrayList)4 ComparisonPredicate (org.hibernate.sql.ast.tree.predicate.ComparisonPredicate)4 BinaryArithmeticExpression (org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression)3 CaseSearchedExpression (org.hibernate.sql.ast.tree.expression.CaseSearchedExpression)3 CaseSimpleExpression (org.hibernate.sql.ast.tree.expression.CaseSimpleExpression)3 ColumnReference (org.hibernate.sql.ast.tree.expression.ColumnReference)3 ModifiedSubQueryExpression (org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression)3 SelfRenderingExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingExpression)3 SqlSelectionExpression (org.hibernate.sql.ast.tree.expression.SqlSelectionExpression)3 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)2 BasicValuedModelPart (org.hibernate.metamodel.mapping.BasicValuedModelPart)2 EntityIdentifierMapping (org.hibernate.metamodel.mapping.EntityIdentifierMapping)2 SqmInListPredicate (org.hibernate.query.sqm.tree.predicate.SqmInListPredicate)2 SqlTuple (org.hibernate.sql.ast.tree.expression.SqlTuple)2 InSubQueryPredicate (org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate)2 AbstractMap (java.util.AbstractMap)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1