use of org.hibernate.query.sqm.tree.predicate.SqmAndPredicate in project hibernate-orm by hibernate.
the class SqmCriteriaNodeBuilder method wrap.
@Override
@SafeVarargs
public final SqmPredicate wrap(Expression<Boolean>... expressions) {
if (expressions.length == 1) {
return wrap(expressions[0]);
}
final SqmPredicate lhs = wrap(expressions[0]);
final SqmPredicate rhs = wrap(expressions[1]);
SqmPredicate predicate = new SqmAndPredicate(lhs, rhs, this);
for (int i = 2; i < expressions.length; i++) {
predicate = new SqmAndPredicate(predicate, wrap(expressions[i]), this);
}
return predicate;
}
Aggregations