use of com.blazebit.persistence.parser.predicate.BinaryExpressionPredicate in project blaze-persistence by Blazebit.
the class EqualityCheckingVisitor method visit.
protected Boolean visit(BinaryExpressionPredicate predicate) {
if (referenceExpression.getClass() != predicate.getClass()) {
return Boolean.TRUE;
}
BinaryExpressionPredicate referencePredicate = (BinaryExpressionPredicate) referenceExpression;
if (referencePredicate.isNegated() != predicate.isNegated()) {
return Boolean.TRUE;
}
referenceExpression = referencePredicate.getLeft();
if (predicate.getLeft().accept(this)) {
return Boolean.TRUE;
}
referenceExpression = referencePredicate.getRight();
return predicate.getRight().accept(this);
}
use of com.blazebit.persistence.parser.predicate.BinaryExpressionPredicate in project blaze-persistence by Blazebit.
the class AbstractQuantifiablePredicateBuilder method onBuilderEnded.
@Override
public void onBuilderEnded(SubqueryInternalBuilder<T> builder) {
super.onBuilderEnded(builder);
// set the finished subquery builder on the previously created predicate
if (predicate instanceof BinaryExpressionPredicate) {
((BinaryExpressionPredicate) predicate).setRight(new SubqueryExpression(builder));
} else {
throw new IllegalStateException("SubqueryBuilder ended but predicate type was unexpected");
}
listener.onBuilderEnded(this);
}
Aggregations