Search in sources :

Example 1 with SqmAndPredicate

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;
}
Also used : SqmPredicate(org.hibernate.query.sqm.tree.predicate.SqmPredicate) SqmAndPredicate(org.hibernate.query.sqm.tree.predicate.SqmAndPredicate)

Aggregations

SqmAndPredicate (org.hibernate.query.sqm.tree.predicate.SqmAndPredicate)1 SqmPredicate (org.hibernate.query.sqm.tree.predicate.SqmPredicate)1