use of org.hibernate.query.sqm.tree.predicate.SqmBetweenPredicate in project hibernate-orm by hibernate.
the class BaseSqmToSqlAstConverter method visitBetweenPredicate.
@Override
public BetweenPredicate visitBetweenPredicate(SqmBetweenPredicate predicate) {
final FromClauseIndex fromClauseIndex = fromClauseIndexStack.getCurrent();
final Expression expression;
final Expression lowerBound;
final Expression upperBound;
inferrableTypeAccessStack.push(() -> coalesceSuppliedValues(() -> determineValueMapping(predicate.getLowerBound(), fromClauseIndex), () -> determineValueMapping(predicate.getUpperBound(), fromClauseIndex)));
try {
expression = (Expression) predicate.getExpression().accept(this);
} finally {
inferrableTypeAccessStack.pop();
}
inferrableTypeAccessStack.push(() -> coalesceSuppliedValues(() -> determineValueMapping(predicate.getExpression(), fromClauseIndex), () -> determineValueMapping(predicate.getUpperBound(), fromClauseIndex)));
try {
lowerBound = (Expression) predicate.getLowerBound().accept(this);
} finally {
inferrableTypeAccessStack.pop();
}
inferrableTypeAccessStack.push(() -> coalesceSuppliedValues(() -> determineValueMapping(predicate.getExpression(), fromClauseIndex), () -> determineValueMapping(predicate.getLowerBound(), fromClauseIndex)));
try {
upperBound = (Expression) predicate.getUpperBound().accept(this);
} finally {
inferrableTypeAccessStack.pop();
}
return new BetweenPredicate(expression, lowerBound, upperBound, predicate.isNegated(), getBooleanType());
}
Aggregations