Interface SimpleBooleanPredicateClausesCollector<S extends SimpleBooleanPredicateClausesCollector<?>>

    • Method Detail

      • add

        S add​(PredicateFinalStep searchPredicate)
        Adds the specified predicate to the list of clauses.
        Returns:
        this, for method chaining.
      • add

        S add​(Function<? super SearchPredicateFactory,​? extends PredicateFinalStep> clauseContributor)
        Adds a clause to be defined by the given function.

        Best used with lambda expressions.

        Parameters:
        clauseContributor - A function that will use the factory passed in parameter to create a predicate, returning the final step in the predicate DSL. Should generally be a lambda expression.
        Returns:
        this, for method chaining.
      • with

        S with​(Consumer<? super S> contributor)
        Delegates setting clauses and options to a given consumer.

        Best used with lambda expressions.

        Parameters:
        contributor - A consumer that will add clauses and options to the collector that it consumes. Should generally be a lambda expression.
        Returns:
        this, for method chaining.
      • hasClause

        boolean hasClause()
        Checks if this predicate contains at least one clause.
        Returns:
        true if any clauses were added, i.e. any of the add(..) methods were called at least once, false otherwise.