Class AbstractSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>>
java.lang.Object
org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
org.hibernate.search.engine.search.predicate.dsl.impl.AbstractSimpleBooleanPredicateClausesStep<S,C>
- All Implemented Interfaces:
GenericSimpleBooleanPredicateClausesStep<S,,C> PredicateFinalStep,SimpleBooleanPredicateClausesCollector<C>
- Direct Known Subclasses:
NestedPredicateClausesStepImpl,SimpleBooleanPredicateClausesStepImpl
public abstract class AbstractSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>>
extends AbstractPredicateFinalStep
implements GenericSimpleBooleanPredicateClausesStep<S,C>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum -
Field Summary
Fields inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
dslContext -
Method Summary
Modifier and TypeMethodDescriptionadd(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Adds a clause to be defined by the given function.add(SearchPredicate searchPredicate) Adds the specified previously-builtSearchPredicateto the list of clauses.boost(float boost) protected SearchPredicatebuild()booleanChecks if this predicate contains at least one clause.protected abstract Sself()Delegates setting clauses and options to a given consumer.Methods inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
toPredicateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.search.predicate.dsl.GenericSimpleBooleanPredicateClausesStep
addMethods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
-
Method Details
-
self
-
add
Description copied from interface:SimpleBooleanPredicateClausesCollectorAdds the specified previously-builtSearchPredicateto the list of clauses.- Specified by:
addin interfaceGenericSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>> - Specified by:
addin interfaceSimpleBooleanPredicateClausesCollector<S extends C>- Returns:
this, for method chaining.
-
add
public S add(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) Description copied from interface:SimpleBooleanPredicateClausesCollectorAdds a clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
addin interfaceGenericSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>> - Specified by:
addin 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.
-
boost
-
constantScore
-
with
Description copied from interface:SimpleBooleanPredicateClausesCollectorDelegates setting clauses and options to a given consumer.Best used with lambda expressions.
- Specified by:
within interfaceGenericSimpleBooleanPredicateClausesStep<S extends C,C extends SimpleBooleanPredicateClausesCollector<?>> - Specified by:
within 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.
-
hasClause
public boolean hasClause()Description copied from interface:SimpleBooleanPredicateClausesCollectorChecks if this predicate contains at least one clause.- Specified by:
hasClausein interfaceSimpleBooleanPredicateClausesCollector<S extends C>- Returns:
trueif any clauses were added, i.e. any of theadd(..)methods were called at least once,falseotherwise.
-
build
- Specified by:
buildin classAbstractPredicateFinalStep
-