Class PredicateGroup

  • All Implemented Interfaces:
    Cloneable, Iterable<Predicate>, Collection<Predicate>, List<Predicate>

    public class PredicateGroup
    extends Predicate
    implements List<Predicate>
    A PredicateGroup is a Predicate that represents a list of Predicates (following the composite pattern). This allows to build predicate trees for reflecting complex queries that include sub-terms.

    The predicates in a group are by default all required to match, ie. they will be combined with "AND" in a lower-level query language, which is indicated by allRequired() returning true. If setAllRequired(boolean) is called with false, or if the parameter or is set to true, the child predicates will be combined with "OR", ie. only one must match for the whole group to match.

    If the parameter not is set to true, the result of this group will be negated. See also isNegated() and setNegated(boolean).

    This class extends both the Predicate class and implements the List interface, backed by a standard ArrayList internally.

    The standard type name for predicate groups is given by TYPE ( "group"), which is also used when using the default constructor.

    Since:
    5.2