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 Classes Modifier and Type Class Description static classAbstractSimpleBooleanPredicateClausesStep.SimpleBooleanPredicateOperator
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
dslContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Sadd(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)Adds a clause to be defined by the given function.Sadd(SearchPredicate searchPredicate)Adds the specified previously-builtSearchPredicateto the list of clauses.Sboost(float boost)protected SearchPredicatebuild()SconstantScore()booleanhasClause()Checks if this predicate contains at least one clause.protected abstract Sself()Swith(Consumer<? super C> contributor)Delegates setting clauses and options to a given consumer.-
Methods inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
toPredicate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.GenericSimpleBooleanPredicateClausesStep
add
-
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
-
-
-
-
Method Detail
-
self
protected abstract S self()
-
add
public S add(SearchPredicate searchPredicate)
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
public S boost(float boost)
-
constantScore
public S constantScore()
-
with
public S with(Consumer<? super C> contributor)
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
protected SearchPredicate build()
- Specified by:
buildin classAbstractPredicateFinalStep
-
-