Search in sources :

Example 61 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression 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 62 with Expression

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

the class BaseSqmToSqlAstConverter method visitBinaryArithmeticExpression.

@Override
public Object visitBinaryArithmeticExpression(SqmBinaryArithmetic<?> expression) {
    SqmExpression<?> leftOperand = expression.getLeftHandOperand();
    SqmExpression<?> rightOperand = expression.getRightHandOperand();
    boolean durationToRight = isDuration(rightOperand.getNodeType());
    TypeConfiguration typeConfiguration = getCreationContext().getMappingMetamodel().getTypeConfiguration();
    TemporalType temporalTypeToLeft = typeConfiguration.getSqlTemporalType(leftOperand.getNodeType());
    TemporalType temporalTypeToRight = typeConfiguration.getSqlTemporalType(rightOperand.getNodeType());
    boolean temporalTypeSomewhereToLeft = adjustedTimestamp != null || temporalTypeToLeft != null;
    if (temporalTypeToLeft != null && durationToRight) {
        if (adjustmentScale != null || negativeAdjustment) {
            // we can't distribute a scale over a date/timestamp
            throw new SemanticException("scalar multiplication of temporal value");
        }
    }
    if (durationToRight && temporalTypeSomewhereToLeft) {
        return transformDurationArithmetic(expression);
    } else if (temporalTypeToLeft != null && temporalTypeToRight != null) {
        return transformDatetimeArithmetic(expression);
    } else {
        // Infer one operand type through the other
        final FromClauseIndex fromClauseIndex = fromClauseIndexStack.getCurrent();
        inferrableTypeAccessStack.push(() -> determineValueMapping(rightOperand, fromClauseIndex));
        final Expression lhs = toSqlExpression(leftOperand.accept(this));
        inferrableTypeAccessStack.pop();
        inferrableTypeAccessStack.push(() -> determineValueMapping(leftOperand, fromClauseIndex));
        final Expression rhs = toSqlExpression(rightOperand.accept(this));
        inferrableTypeAccessStack.pop();
        if (durationToRight && appliedByUnit != null) {
            return new BinaryArithmeticExpression(lhs, expression.getOperator(), rhs, // we always get a Long value back
            (BasicValuedMapping) appliedByUnit.getNodeType());
        } else {
            return new BinaryArithmeticExpression(lhs, expression.getOperator(), rhs, getExpressionType(expression));
        }
    }
}
Also used : BasicValuedMapping(org.hibernate.metamodel.mapping.BasicValuedMapping) 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) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) TypeConfiguration(org.hibernate.type.spi.TypeConfiguration) TemporalType(jakarta.persistence.TemporalType) SemanticException(org.hibernate.query.SemanticException)

Example 63 with Expression

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

the class BaseSqmToSqlAstConverter method visitBasicValuedPath.

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// SqmPath
@Override
public Expression visitBasicValuedPath(SqmBasicValuedSimplePath<?> sqmPath) {
    final BasicValuedPathInterpretation<?> path = prepareReusablePath(sqmPath, () -> BasicValuedPathInterpretation.from(sqmPath, this, this, jpaQueryComplianceEnabled));
    Expression result = path;
    if (isDuration(sqmPath.getNodeType())) {
        // Durations are stored (at least by default)
        // in a NUMERIC column in seconds with fractional
        // seconds in the decimal places
        // which we need to convert to the given unit
        // 
        // This does not work at all for a Duration
        // mapped to a VARCHAR column, in which case
        // we would need to parse the weird format
        // defined by java.time.Duration (a bit hard
        // to do without some custom function).
        // Nor does it work for databases which have
        // a well-defined INTERVAL type, but that is
        // something we could implement.
        // first let's apply the propagated scale
        Expression scaledExpression = applyScale(toSqlExpression(path));
        if (adjustedTimestamp != null) {
            if (appliedByUnit != null) {
                throw new IllegalStateException();
            }
            // we're adding this variable duration to the
            // given date or timestamp, producing an
            // adjusted date or timestamp
            result = timestampadd().expression((ReturnableType<?>) adjustedTimestampType, new DurationUnit(SECOND, basicType(Long.class)), scaledExpression, adjustedTimestamp);
        } else if (appliedByUnit != null) {
            // we're applying the 'by unit' operator,
            // producing a literal scalar value, so
            // we must convert this duration from
            // nanoseconds to the given unit
            JdbcMappingContainer durationType = scaledExpression.getExpressionType();
            Duration duration;
            if (durationType.getJdbcMappings().get(0).getJdbcType().isInterval()) {
                // For interval types, we need to extract the epoch for integer arithmetic for the 'by unit' operator
                duration = new Duration(extractEpoch(scaledExpression), SECOND, (BasicValuedMapping) durationType);
            } else {
                // The absolute value of the expression is in seconds
                // as the fractional seconds are in the fraction part as can be seen in DurationJavaType
                duration = new Duration(scaledExpression, SECOND, (BasicValuedMapping) durationType);
            }
            TemporalUnit appliedUnit = appliedByUnit.getUnit().getUnit();
            BasicValuedMapping scalarType = (BasicValuedMapping) appliedByUnit.getNodeType();
            result = new Conversion(duration, appliedUnit, scalarType);
        } else {
            // a "bare" Duration value in nanoseconds
            result = scaledExpression;
        }
    }
    return withTreatRestriction(result, sqmPath);
}
Also used : ReturnableType(org.hibernate.query.ReturnableType) BasicValuedMapping(org.hibernate.metamodel.mapping.BasicValuedMapping) JdbcMappingContainer(org.hibernate.metamodel.mapping.JdbcMappingContainer) 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) TemporalUnit(org.hibernate.query.sqm.TemporalUnit) SqmDurationUnit(org.hibernate.query.sqm.tree.expression.SqmDurationUnit) DurationUnit(org.hibernate.sql.ast.tree.expression.DurationUnit) SqmToDuration(org.hibernate.query.sqm.tree.expression.SqmToDuration) Duration(org.hibernate.sql.ast.tree.expression.Duration) TypeConfiguration.isDuration(org.hibernate.type.spi.TypeConfiguration.isDuration) Conversion(org.hibernate.query.sqm.tree.expression.Conversion)

Example 64 with Expression

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

the class BaseSqmToSqlAstConverter method visitPluralAttributeSizeFunction.

@Override
public Expression visitPluralAttributeSizeFunction(SqmCollectionSize function) {
    final SqmPath<?> pluralPath = function.getPluralPath();
    prepareReusablePath(pluralPath, () -> null);
    final TableGroup parentTableGroup = getFromClauseAccess().getTableGroup(pluralPath.getNavigablePath().getParent());
    assert parentTableGroup != null;
    final PluralAttributeMapping pluralAttributeMapping = (PluralAttributeMapping) parentTableGroup.getModelPart().findSubPart(pluralPath.getNavigablePath().getUnaliasedLocalName(), null);
    assert pluralAttributeMapping != null;
    final QuerySpec subQuerySpec = new QuerySpec(false);
    pushProcessingState(new SqlAstQueryPartProcessingStateImpl(subQuerySpec, getCurrentProcessingState(), this, currentClauseStack::getCurrent, false));
    try {
        final TableGroup tableGroup = pluralAttributeMapping.createRootTableGroup(true, pluralPath.getNavigablePath(), null, () -> subQuerySpec::applyPredicate, this, creationContext);
        pluralAttributeMapping.applyBaseRestrictions(subQuerySpec::applyPredicate, tableGroup, true, getLoadQueryInfluencers().getEnabledFilters(), null, this);
        getFromClauseAccess().registerTableGroup(pluralPath.getNavigablePath(), tableGroup);
        registerPluralTableGroupParts(tableGroup);
        subQuerySpec.getFromClause().addRoot(tableGroup);
        final AbstractSqmSelfRenderingFunctionDescriptor functionDescriptor = (AbstractSqmSelfRenderingFunctionDescriptor) creationContext.getSessionFactory().getQueryEngine().getSqmFunctionRegistry().findFunctionDescriptor("count");
        final BasicType<Integer> integerType = creationContext.getMappingMetamodel().getTypeConfiguration().getBasicTypeForJavaType(Integer.class);
        final Expression expression = new SelfRenderingAggregateFunctionSqlAstExpression(functionDescriptor.getName(), functionDescriptor, Collections.singletonList(new QueryLiteral<>(1, integerType)), null, integerType, integerType);
        subQuerySpec.getSelectClause().addSqlSelection(new SqlSelectionImpl(1, 0, expression));
        subQuerySpec.applyPredicate(pluralAttributeMapping.getKeyDescriptor().generateJoinPredicate(parentTableGroup, tableGroup, getSqlExpressionResolver(), creationContext));
    } finally {
        popProcessingStateStack();
    }
    return subQuerySpec;
}
Also used : SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) VirtualTableGroup(org.hibernate.sql.ast.tree.from.VirtualTableGroup) LazyTableGroup(org.hibernate.sql.ast.tree.from.LazyTableGroup) TableGroup(org.hibernate.sql.ast.tree.from.TableGroup) CorrelatedTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedTableGroup) CorrelatedPluralTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedPluralTableGroup) PluralTableGroup(org.hibernate.sql.ast.tree.from.PluralTableGroup) QueryPartTableGroup(org.hibernate.sql.ast.tree.from.QueryPartTableGroup) PluralAttributeMapping(org.hibernate.metamodel.mapping.PluralAttributeMapping) AbstractSqmSelfRenderingFunctionDescriptor(org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor) BigInteger(java.math.BigInteger) SqlAstQueryPartProcessingStateImpl(org.hibernate.query.sqm.sql.internal.SqlAstQueryPartProcessingStateImpl) QueryLiteral(org.hibernate.sql.ast.tree.expression.QueryLiteral) ConvertedQueryLiteral(org.hibernate.sql.ast.tree.expression.ConvertedQueryLiteral) 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) SqlSelectionImpl(org.hibernate.sql.results.internal.SqlSelectionImpl) SqmQuerySpec(org.hibernate.query.sqm.tree.select.SqmQuerySpec) QuerySpec(org.hibernate.sql.ast.tree.select.QuerySpec)

Example 65 with Expression

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

the class BaseSqmToSqlAstConverter method createCorrelatedAggregateSubQuery.

protected Expression createCorrelatedAggregateSubQuery(AbstractSqmSpecificPluralPartPath<?> pluralPartPath, boolean index, String function) {
    prepareReusablePath(pluralPartPath.getLhs(), () -> null);
    final PluralAttributeMapping pluralAttributeMapping = (PluralAttributeMapping) determineValueMapping(pluralPartPath.getPluralDomainPath());
    final FromClauseAccess parentFromClauseAccess = getFromClauseAccess();
    final QuerySpec subQuerySpec = new QuerySpec(false);
    pushProcessingState(new SqlAstQueryPartProcessingStateImpl(subQuerySpec, getCurrentProcessingState(), this, currentClauseStack::getCurrent, false));
    try {
        final TableGroup tableGroup = pluralAttributeMapping.createRootTableGroup(true, pluralPartPath.getNavigablePath(), null, () -> subQuerySpec::applyPredicate, this, creationContext);
        pluralAttributeMapping.applyBaseRestrictions(subQuerySpec::applyPredicate, tableGroup, true, getLoadQueryInfluencers().getEnabledFilters(), null, this);
        getFromClauseAccess().registerTableGroup(pluralPartPath.getNavigablePath(), tableGroup);
        registerPluralTableGroupParts(tableGroup);
        subQuerySpec.getFromClause().addRoot(tableGroup);
        final AbstractSqmSelfRenderingFunctionDescriptor functionDescriptor = (AbstractSqmSelfRenderingFunctionDescriptor) creationContext.getSessionFactory().getQueryEngine().getSqmFunctionRegistry().findFunctionDescriptor(function);
        final CollectionPart collectionPart = index ? pluralAttributeMapping.getIndexDescriptor() : pluralAttributeMapping.getElementDescriptor();
        final ModelPart modelPart;
        if (collectionPart instanceof EntityAssociationMapping) {
            modelPart = ((EntityAssociationMapping) collectionPart).getKeyTargetMatchPart();
        } else {
            modelPart = collectionPart;
        }
        final List<Expression> arguments = new ArrayList<>(1);
        final NavigablePath navigablePath = pluralPartPath.getNavigablePath();
        final int jdbcTypeCount = modelPart.getJdbcTypeCount();
        final List<Expression> tupleElements;
        if (jdbcTypeCount == 1) {
            tupleElements = arguments;
        } else {
            tupleElements = new ArrayList<>(jdbcTypeCount);
        }
        modelPart.forEachSelectable((selectionIndex, selectionMapping) -> tupleElements.add(new ColumnReference(tableGroup.resolveTableReference(navigablePath, selectionMapping.getContainingTableExpression()), selectionMapping, creationContext.getSessionFactory())));
        if (jdbcTypeCount != 1) {
            arguments.add(new SqlTuple(tupleElements, modelPart));
        }
        final Expression expression = new SelfRenderingAggregateFunctionSqlAstExpression(functionDescriptor.getName(), functionDescriptor, arguments, null, (ReturnableType<?>) functionDescriptor.getReturnTypeResolver().resolveFunctionReturnType(() -> null, arguments).getJdbcMapping(), modelPart);
        subQuerySpec.getSelectClause().addSqlSelection(new SqlSelectionImpl(1, 0, expression));
        NavigablePath parent = pluralPartPath.getPluralDomainPath().getNavigablePath().getParent();
        subQuerySpec.applyPredicate(pluralAttributeMapping.getKeyDescriptor().generateJoinPredicate(parentFromClauseAccess.findTableGroup(parent), tableGroup, getSqlExpressionResolver(), creationContext));
    } finally {
        popProcessingStateStack();
    }
    return subQuerySpec;
}
Also used : SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) VirtualTableGroup(org.hibernate.sql.ast.tree.from.VirtualTableGroup) LazyTableGroup(org.hibernate.sql.ast.tree.from.LazyTableGroup) TableGroup(org.hibernate.sql.ast.tree.from.TableGroup) CorrelatedTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedTableGroup) CorrelatedPluralTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedPluralTableGroup) PluralTableGroup(org.hibernate.sql.ast.tree.from.PluralTableGroup) QueryPartTableGroup(org.hibernate.sql.ast.tree.from.QueryPartTableGroup) NavigablePath(org.hibernate.query.spi.NavigablePath) ConvertibleModelPart(org.hibernate.metamodel.mapping.ConvertibleModelPart) ModelPart(org.hibernate.metamodel.mapping.ModelPart) EntityValuedModelPart(org.hibernate.metamodel.mapping.EntityValuedModelPart) BasicValuedModelPart(org.hibernate.metamodel.mapping.BasicValuedModelPart) EmbeddableValuedModelPart(org.hibernate.metamodel.mapping.EmbeddableValuedModelPart) EntityAssociationMapping(org.hibernate.metamodel.mapping.EntityAssociationMapping) PluralAttributeMapping(org.hibernate.metamodel.mapping.PluralAttributeMapping) ArrayList(java.util.ArrayList) AbstractSqmSelfRenderingFunctionDescriptor(org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor) SqlAstQueryPartProcessingStateImpl(org.hibernate.query.sqm.sql.internal.SqlAstQueryPartProcessingStateImpl) FromClauseAccess(org.hibernate.sql.ast.spi.FromClauseAccess) 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) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) SqlSelectionImpl(org.hibernate.sql.results.internal.SqlSelectionImpl) SqmQuerySpec(org.hibernate.query.sqm.tree.select.SqmQuerySpec) QuerySpec(org.hibernate.sql.ast.tree.select.QuerySpec) EntityCollectionPart(org.hibernate.metamodel.mapping.internal.EntityCollectionPart) CollectionPart(org.hibernate.metamodel.mapping.CollectionPart) EmbeddedCollectionPart(org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference)

Aggregations

Expression (org.hibernate.sql.ast.tree.expression.Expression)130 CaseSearchedExpression (org.hibernate.sql.ast.tree.expression.CaseSearchedExpression)68 CaseSimpleExpression (org.hibernate.sql.ast.tree.expression.CaseSimpleExpression)67 BinaryArithmeticExpression (org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression)62 SqlSelectionExpression (org.hibernate.sql.ast.tree.expression.SqlSelectionExpression)57 ModifiedSubQueryExpression (org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression)54 SelfRenderingExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingExpression)54 ColumnReference (org.hibernate.sql.ast.tree.expression.ColumnReference)42 SelfRenderingFunctionSqlAstExpression (org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression)37 SqlTuple (org.hibernate.sql.ast.tree.expression.SqlTuple)35 SqmExpression (org.hibernate.query.sqm.tree.expression.SqmExpression)34 SelfRenderingSqlFragmentExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression)33 SelfRenderingAggregateFunctionSqlAstExpression (org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression)32 ArrayList (java.util.ArrayList)31 SqmModifiedSubQueryExpression (org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression)31 TableGroup (org.hibernate.sql.ast.tree.from.TableGroup)28 TableReference (org.hibernate.sql.ast.tree.from.TableReference)25 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)23 ComparisonPredicate (org.hibernate.sql.ast.tree.predicate.ComparisonPredicate)23 NavigablePath (org.hibernate.query.spi.NavigablePath)21