Interface GenericSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>>
- Type Parameters:
S
- The "self" type (the actual exposed type of this collector).C
- The "collector" type (the type of collector passed to the consumer inwith(Consumer)
).
- All Superinterfaces:
PredicateFinalStep
,SimpleBooleanPredicateClausesCollector<C>
- All Known Subinterfaces:
NestedPredicateClausesStep<S>
,SimpleBooleanPredicateClausesStep<S>
public interface GenericSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>>
extends SimpleBooleanPredicateClausesCollector<C>, PredicateFinalStep
A generic superinterface for "simple boolean predicate" DSL steps that involve collecting
clauses.
See also PredicateScoreStep
or PredicateFinalStep
.
-
Method Summary
Modifier and TypeMethodDescriptionadd
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Adds a clause to be defined by the given function.default S
add
(PredicateFinalStep searchPredicate) Adds the specified predicate to the list of clauses.add
(SearchPredicate searchPredicate) Adds the specified previously-builtSearchPredicate
to the list of clauses.Delegates setting clauses and options to a given consumer.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.SimpleBooleanPredicateClausesCollector
hasClause
-
Method Details
-
add
Description copied from interface:SimpleBooleanPredicateClausesCollector
Adds the specified predicate to the list of clauses.- Specified by:
add
in interfaceSimpleBooleanPredicateClausesCollector<S extends C>
- Returns:
this
, for method chaining.
-
add
Description copied from interface:SimpleBooleanPredicateClausesCollector
Adds the specified previously-builtSearchPredicate
to the list of clauses.- Specified by:
add
in interfaceSimpleBooleanPredicateClausesCollector<S extends C>
- Returns:
this
, for method chaining.
-
add
Description copied from interface:SimpleBooleanPredicateClausesCollector
Adds a clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
add
in interfaceSimpleBooleanPredicateClausesCollector<S extends C>
- 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
Description copied from interface:SimpleBooleanPredicateClausesCollector
Delegates setting clauses and options to a given consumer.Best used with lambda expressions.
- Specified by:
with
in interfaceSimpleBooleanPredicateClausesCollector<S extends C>
- 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.
-