Interface GenericBooleanPredicateClausesStep<S extends C,C extends BooleanPredicateOptionsCollector<?>>
- 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:
BooleanPredicateOptionsCollector<C>
,CommonMinimumShouldMatchOptionsStep<C>
,PredicateFinalStep
,PredicateScoreStep<S>
- All Known Subinterfaces:
BooleanPredicateClausesStep<S>
public interface GenericBooleanPredicateClausesStep<S extends C,C extends BooleanPredicateOptionsCollector<?>>
extends BooleanPredicateOptionsCollector<C>, PredicateScoreStep<S>, PredicateFinalStep
A generic superinterface for Predicate DSL steps that involve collecting clauses and options of a boolean predicate.
This interface mostly a technical detail to handle generics in the predicate DSL;
refer to BooleanPredicateOptionsCollector
, PredicateScoreStep
or PredicateFinalStep
for meaningful documentation.
-
Method Summary
Modifier and TypeMethodDescriptionfilter
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Add a "filter" clause to be defined by the given function.default S
filter
(PredicateFinalStep dslFinalStep) Add a "filter" clause based on an almost-builtSearchPredicate
.filter
(SearchPredicate searchPredicate) Add a "filter" clause based on a previously-builtSearchPredicate
.minimumShouldMatch
(Consumer<? super MinimumShouldMatchConditionStep<?>> constraintContributor) Start defining the minimum number of "should" constraints that have to match in order for the boolean predicate to match.default S
minimumShouldMatchNumber
(int matchingClausesNumber) Add a default "minimumShouldMatch" constraint.default S
minimumShouldMatchPercent
(int matchingClausesPercent) Add a default "minimumShouldMatch" constraint.must
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Add a "must" clause to be defined by the given function.default S
must
(PredicateFinalStep dslFinalStep) Add a "must" clause based on an almost-builtSearchPredicate
.must
(SearchPredicate searchPredicate) Add a "must" clause based on a previously-builtSearchPredicate
.mustNot
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Add a "must not" clause to be defined by the given function.default S
mustNot
(PredicateFinalStep dslFinalStep) Add a "must not" clause based on an almost-builtSearchPredicate
.mustNot
(SearchPredicate searchPredicate) Add a "must not" clause based on a previously-builtSearchPredicate
.should
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Add a "should" clause to be defined by the given function.default S
should
(PredicateFinalStep dslFinalStep) Add a "should" clause based on an almost-builtSearchPredicate
.should
(SearchPredicate searchPredicate) Add a "should" clause based on a previously-builtSearchPredicate
.Delegates setting clauses and options to a given consumer.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateOptionsCollector
hasClause
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateScoreStep
boost, constantScore
-
Method Details
-
with
Description copied from interface:BooleanPredicateOptionsCollector
Delegates setting clauses and options to a given consumer.Best used with lambda expressions.
- Specified by:
with
in interfaceBooleanPredicateOptionsCollector<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.
-
must
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must" clause based on a previously-builtSearchPredicate
.- Specified by:
must
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
searchPredicate
- The predicate that must match.- Returns:
this
, for method chaining.
-
mustNot
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must not" clause based on a previously-builtSearchPredicate
.- Specified by:
mustNot
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
searchPredicate
- The predicate that must not match.- Returns:
this
, for method chaining.
-
should
Description copied from interface:BooleanPredicateOptionsCollector
Add a "should" clause based on a previously-builtSearchPredicate
.- Specified by:
should
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
searchPredicate
- The predicate that should match.- Returns:
this
, for method chaining.
-
filter
Description copied from interface:BooleanPredicateOptionsCollector
Add a "filter" clause based on a previously-builtSearchPredicate
.- Specified by:
filter
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
searchPredicate
- The predicate that must match.- Returns:
this
, for method chaining.
-
must
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must" clause based on an almost-builtSearchPredicate
.- Specified by:
must
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
dslFinalStep
- A final step in the predicate DSL allowing the retrieval of aSearchPredicate
.- Returns:
this
, for method chaining.
-
mustNot
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must not" clause based on an almost-builtSearchPredicate
.- Specified by:
mustNot
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
dslFinalStep
- A final step in the predicate DSL allowing the retrieval of aSearchPredicate
.- Returns:
this
, for method chaining.
-
should
Description copied from interface:BooleanPredicateOptionsCollector
Add a "should" clause based on an almost-builtSearchPredicate
.- Specified by:
should
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
dslFinalStep
- A final step in the predicate DSL allowing the retrieval of aSearchPredicate
.- Returns:
this
, for method chaining.
-
filter
Description copied from interface:BooleanPredicateOptionsCollector
Add a "filter" clause based on an almost-builtSearchPredicate
.- Specified by:
filter
in interfaceBooleanPredicateOptionsCollector<S extends C>
- Parameters:
dslFinalStep
- A final step in the predicate DSL allowing the retrieval of aSearchPredicate
.- Returns:
this
, for method chaining.
-
must
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
must
in interfaceBooleanPredicateOptionsCollector<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.
-
mustNot
Description copied from interface:BooleanPredicateOptionsCollector
Add a "must not" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
mustNot
in interfaceBooleanPredicateOptionsCollector<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.
-
should
Description copied from interface:BooleanPredicateOptionsCollector
Add a "should" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
should
in interfaceBooleanPredicateOptionsCollector<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.
-
filter
Description copied from interface:BooleanPredicateOptionsCollector
Add a "filter" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
filter
in interfaceBooleanPredicateOptionsCollector<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.
-
minimumShouldMatchNumber
Description copied from interface:CommonMinimumShouldMatchOptionsStep
Add a default "minimumShouldMatch" constraint.- Specified by:
minimumShouldMatchNumber
in interfaceCommonMinimumShouldMatchOptionsStep<S extends C>
- Parameters:
matchingClausesNumber
- A definition of the number of "should" clauses that have to match. If positive, it is the number of clauses that have to match. See Definition of the minimum for details and possible values, in particular negative values.- Returns:
this
, for method chaining.
-
minimumShouldMatchPercent
Description copied from interface:CommonMinimumShouldMatchOptionsStep
Add a default "minimumShouldMatch" constraint.- Specified by:
minimumShouldMatchPercent
in interfaceCommonMinimumShouldMatchOptionsStep<S extends C>
- Parameters:
matchingClausesPercent
- A definition of the number of "should" clauses that have to match, as a percentage. If positive, it is the percentage of the total number of "should" clauses that have to match. See Definition of the minimum for details and possible values, in particular negative values.- Returns:
this
, for method chaining.
-
minimumShouldMatch
MinimumShouldMatchConditionStep<S> minimumShouldMatch()- Specified by:
minimumShouldMatch
in interfaceCommonMinimumShouldMatchOptionsStep<S extends C>
-
minimumShouldMatch
Description copied from interface:CommonMinimumShouldMatchOptionsStep
Start defining the minimum number of "should" constraints that have to match in order for the boolean predicate to match.- Specified by:
minimumShouldMatch
in interfaceCommonMinimumShouldMatchOptionsStep<S extends C>
- Returns:
- A
MinimumShouldMatchConditionStep
where constraints can be defined.
-