Search in sources :

Example 1 with VisitablePredicate

use of com.hazelcast.query.impl.predicates.VisitablePredicate in project hazelcast by hazelcast.

the class PredicateBuilderImpl method accept.

@Override
public Predicate accept(Visitor visitor, Indexes indexes) {
    Predicate predicate = lsPredicates.get(0);
    if (predicate instanceof VisitablePredicate) {
        Predicate newPredicate = ((VisitablePredicate) predicate).accept(visitor, indexes);
        if (newPredicate != predicate) {
            PredicateBuilderImpl newPredicateBuilder = new PredicateBuilderImpl();
            newPredicateBuilder.attribute = attribute;
            newPredicateBuilder.lsPredicates.addAll(lsPredicates);
            newPredicateBuilder.lsPredicates.set(0, newPredicate);
            return newPredicateBuilder;
        }
    }
    return this;
}
Also used : VisitablePredicate(com.hazelcast.query.impl.predicates.VisitablePredicate) IndexAwarePredicate(com.hazelcast.query.impl.predicates.IndexAwarePredicate) VisitablePredicate(com.hazelcast.query.impl.predicates.VisitablePredicate) Predicate(com.hazelcast.query.Predicate)

Aggregations

Predicate (com.hazelcast.query.Predicate)1 IndexAwarePredicate (com.hazelcast.query.impl.predicates.IndexAwarePredicate)1 VisitablePredicate (com.hazelcast.query.impl.predicates.VisitablePredicate)1