public interface Predicate
Defines a criterion to be matched in a Query
.
Multiple predicates can be combined through boolean operators in bulk via and(2 .. n Predicates)
/ or(2 .. n Predicates)
.
Modifier and Type | Method and Description |
---|---|
Predicate |
and(Predicate predicate)
Concatenates this predicate with the given predicate to a combined predicate through a logical AND operator.
|
Predicate |
apply(Function<Predicate,Predicate> transformation)
Applies the given transformation, returning the transformed predicate.
|
Predicate |
not()
Negates this predicate through a logical NOT operator.
|
Predicate |
or(Predicate predicate)
Concatenates this predicate with the given predicate to a combined predicate through a logical OR operator.
|
Predicate and(Predicate predicate)
Concatenates this predicate with the given predicate to a combined predicate through a logical AND operator.
predicate
- the other predicatePredicate or(Predicate predicate)
Concatenates this predicate with the given predicate to a combined predicate through a logical OR operator.
predicate
- the other predicatePredicate not()
Negates this predicate through a logical NOT operator.
Predicate apply(Function<Predicate,Predicate> transformation)
Applies the given transformation, returning the transformed predicate.
If the predicate implementation wraps sub-predicates then this method needs to be overwritten to transform the sub-predicates as well.
transformation
- the predicate transformation to be appliedCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.