use of com.blazebit.persistence.RestrictionBuilder in project blaze-persistence by Blazebit.
the class PredicateManager method restrictCase.
CaseWhenStarterBuilder<RestrictionBuilder<T>> restrictCase(T builder) {
@SuppressWarnings("unchecked") RestrictionBuilder<T> restrictionBuilder = rootPredicate.startBuilder(new RestrictionBuilderImpl<T>(builder, rootPredicate, subqueryInitFactory, expressionFactory, parameterManager, getClauseType()));
caseExpressionBuilderListener = new CaseExpressionBuilderListener((RestrictionBuilderImpl<T>) restrictionBuilder);
return caseExpressionBuilderListener.startBuilder(new CaseWhenBuilderImpl<RestrictionBuilder<T>>(restrictionBuilder, caseExpressionBuilderListener, subqueryInitFactory, expressionFactory, parameterManager, getClauseType()));
}
use of com.blazebit.persistence.RestrictionBuilder in project blaze-persistence by Blazebit.
the class PredicateManager method restrictSimpleCase.
SimpleCaseWhenStarterBuilder<RestrictionBuilder<T>> restrictSimpleCase(T builder, Expression caseOperand) {
@SuppressWarnings("unchecked") RestrictionBuilder<T> restrictionBuilder = rootPredicate.startBuilder(new RestrictionBuilderImpl<T>(builder, rootPredicate, subqueryInitFactory, expressionFactory, parameterManager, getClauseType()));
caseExpressionBuilderListener = new CaseExpressionBuilderListener((RestrictionBuilderImpl<T>) restrictionBuilder);
return caseExpressionBuilderListener.startBuilder(new SimpleCaseWhenBuilderImpl<RestrictionBuilder<T>>(restrictionBuilder, caseExpressionBuilderListener, expressionFactory, caseOperand, subqueryInitFactory, parameterManager, getClauseType()));
}
use of com.blazebit.persistence.RestrictionBuilder 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;
}
use of com.blazebit.persistence.RestrictionBuilder 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;
}
use of com.blazebit.persistence.RestrictionBuilder 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;
}
Aggregations