Search in sources :

Example 1 with RestrictionBuilderExpressionBuilderListener

use of com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener in project blaze-persistence by Blazebit.

the class HavingAndBuilderImpl method havingSubqueries.

@Override
public MultipleSubqueryInitiator<RestrictionBuilder<HavingAndBuilder<T>>> havingSubqueries(String expression) {
    Expression expr = expressionFactory.createSimpleExpression(expression, true);
    RestrictionBuilderImpl<HavingAndBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<HavingAndBuilder<T>>(this, this, subqueryInitFactory, expressionFactory, parameterManager, ClauseType.HAVING));
    // We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
    MultipleSubqueryInitiator<RestrictionBuilder<HavingAndBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<HavingAndBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.HAVING);
    return initiator;
}
Also used : HavingAndBuilder(com.blazebit.persistence.HavingAndBuilder) Expression(com.blazebit.persistence.parser.expression.Expression) MultipleSubqueryInitiatorImpl(com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl) RestrictionBuilderExpressionBuilderListener(com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener) RestrictionBuilder(com.blazebit.persistence.RestrictionBuilder)

Example 2 with RestrictionBuilderExpressionBuilderListener

use of com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener in project blaze-persistence by Blazebit.

the class JoinOnBuilderImpl method onSubqueries.

@Override
public MultipleSubqueryInitiator<RestrictionBuilder<JoinOnBuilder<T>>> onSubqueries(String expression) {
    Expression expr = expressionFactory.createSimpleExpression(expression, true);
    RestrictionBuilderImpl<JoinOnBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<JoinOnBuilder<T>>(this, this, subqueryInitFactory, expressionFactory, parameterManager, ClauseType.JOIN));
    // We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
    MultipleSubqueryInitiator<RestrictionBuilder<JoinOnBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<JoinOnBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.JOIN);
    return initiator;
}
Also used : Expression(com.blazebit.persistence.parser.expression.Expression) MultipleSubqueryInitiatorImpl(com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl) JoinOnBuilder(com.blazebit.persistence.JoinOnBuilder) RestrictionBuilderExpressionBuilderListener(com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener) RestrictionBuilder(com.blazebit.persistence.RestrictionBuilder)

Example 3 with RestrictionBuilderExpressionBuilderListener

use of com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener in project blaze-persistence by Blazebit.

the class WhereOrBuilderImpl method whereSubqueries.

@Override
public MultipleSubqueryInitiator<RestrictionBuilder<WhereOrBuilder<T>>> whereSubqueries(String expression) {
    Expression expr = expressionFactory.createSimpleExpression(expression, true);
    RestrictionBuilderImpl<WhereOrBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<WhereOrBuilder<T>>(this, this, subqueryInitFactory, expressionFactory, parameterManager, ClauseType.WHERE));
    // We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
    MultipleSubqueryInitiator<RestrictionBuilder<WhereOrBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<WhereOrBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.WHERE);
    return initiator;
}
Also used : WhereOrBuilder(com.blazebit.persistence.WhereOrBuilder) Expression(com.blazebit.persistence.parser.expression.Expression) MultipleSubqueryInitiatorImpl(com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl) RestrictionBuilderExpressionBuilderListener(com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener) RestrictionBuilder(com.blazebit.persistence.RestrictionBuilder)

Example 4 with RestrictionBuilderExpressionBuilderListener

use of com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener in project blaze-persistence by Blazebit.

the class WhereAndBuilderImpl method whereSubqueries.

@Override
public MultipleSubqueryInitiator<RestrictionBuilder<WhereAndBuilder<T>>> whereSubqueries(String expression) {
    Expression expr = expressionFactory.createSimpleExpression(expression, true);
    RestrictionBuilderImpl<WhereAndBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<WhereAndBuilder<T>>(this, this, subqueryInitFactory, expressionFactory, parameterManager, ClauseType.WHERE));
    // We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
    MultipleSubqueryInitiator<RestrictionBuilder<WhereAndBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<WhereAndBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.WHERE);
    return initiator;
}
Also used : Expression(com.blazebit.persistence.parser.expression.Expression) MultipleSubqueryInitiatorImpl(com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl) WhereAndBuilder(com.blazebit.persistence.WhereAndBuilder) RestrictionBuilderExpressionBuilderListener(com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener) RestrictionBuilder(com.blazebit.persistence.RestrictionBuilder)

Example 5 with RestrictionBuilderExpressionBuilderListener

use of com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener in project blaze-persistence by Blazebit.

the class HavingOrBuilderImpl method havingSubqueries.

@Override
public MultipleSubqueryInitiator<RestrictionBuilder<HavingOrBuilder<T>>> havingSubqueries(String expression) {
    Expression expr = expressionFactory.createSimpleExpression(expression, true);
    RestrictionBuilderImpl<HavingOrBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<HavingOrBuilder<T>>(this, this, subqueryInitFactory, expressionFactory, parameterManager, ClauseType.HAVING));
    // We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
    MultipleSubqueryInitiator<RestrictionBuilder<HavingOrBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<HavingOrBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.HAVING);
    return initiator;
}
Also used : HavingOrBuilder(com.blazebit.persistence.HavingOrBuilder) Expression(com.blazebit.persistence.parser.expression.Expression) MultipleSubqueryInitiatorImpl(com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl) RestrictionBuilderExpressionBuilderListener(com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener) RestrictionBuilder(com.blazebit.persistence.RestrictionBuilder)

Aggregations

RestrictionBuilder (com.blazebit.persistence.RestrictionBuilder)7 MultipleSubqueryInitiatorImpl (com.blazebit.persistence.impl.MultipleSubqueryInitiatorImpl)7 RestrictionBuilderExpressionBuilderListener (com.blazebit.persistence.impl.RestrictionBuilderExpressionBuilderListener)7 Expression (com.blazebit.persistence.parser.expression.Expression)7 HavingAndBuilder (com.blazebit.persistence.HavingAndBuilder)1 HavingOrBuilder (com.blazebit.persistence.HavingOrBuilder)1 JoinOnAndBuilder (com.blazebit.persistence.JoinOnAndBuilder)1 JoinOnBuilder (com.blazebit.persistence.JoinOnBuilder)1 JoinOnOrBuilder (com.blazebit.persistence.JoinOnOrBuilder)1 WhereAndBuilder (com.blazebit.persistence.WhereAndBuilder)1 WhereOrBuilder (com.blazebit.persistence.WhereOrBuilder)1