use of com.blazebit.persistence.JoinOnOrBuilder in project blaze-persistence by Blazebit.
the class JoinOnOrBuilderImpl method onExpressionSubqueries.
@Override
public MultipleSubqueryInitiator<JoinOnOrBuilder<T>> onExpressionSubqueries(String expression) {
Predicate predicate = expressionFactory.createBooleanExpression(expression, true);
// We don't need a listener or marker here, because the resulting restriction builder can only be ended, when the initiator is ended
MultipleSubqueryInitiator<JoinOnOrBuilder<T>> initiator = new MultipleSubqueryInitiatorImpl<JoinOnOrBuilder<T>>(this, predicate, new ExpressionBuilderEndedListener() {
@Override
public void onBuilderEnded(ExpressionBuilder builder) {
JoinOnOrBuilderImpl.this.predicate.getChildren().add((Predicate) builder.getExpression());
currentMultipleSubqueryInitiator = null;
}
}, subqueryInitFactory, ClauseType.JOIN);
currentMultipleSubqueryInitiator = initiator;
return initiator;
}
use of com.blazebit.persistence.JoinOnOrBuilder in project blaze-persistence by Blazebit.
the class JoinOnOrBuilderImpl method onSubqueries.
@Override
public MultipleSubqueryInitiator<RestrictionBuilder<JoinOnOrBuilder<T>>> onSubqueries(String expression) {
Expression expr = expressionFactory.createSimpleExpression(expression, true);
RestrictionBuilderImpl<JoinOnOrBuilder<T>> restrictionBuilder = startBuilder(new RestrictionBuilderImpl<JoinOnOrBuilder<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<JoinOnOrBuilder<T>>> initiator = new MultipleSubqueryInitiatorImpl<RestrictionBuilder<JoinOnOrBuilder<T>>>(restrictionBuilder, expr, new RestrictionBuilderExpressionBuilderListener(restrictionBuilder), subqueryInitFactory, ClauseType.JOIN);
return initiator;
}
Aggregations