Interface SearchPredicateFactoryExtensionIfSupportedMoreStep
-
- All Superinterfaces:
SearchPredicateFactoryExtensionIfSupportedStep
public interface SearchPredicateFactoryExtensionIfSupportedMoreStep extends SearchPredicateFactoryExtensionIfSupportedStep
The second and later step when attempting to apply multiple extensions to aSearchPredicateFactory
.- See Also:
SearchPredicateFactory.extension()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PredicateFinalStep
orElse(Function<SearchPredicateFactory,? extends PredicateFinalStep> predicateContributor)
If no extension passed toSearchPredicateFactoryExtensionIfSupportedStep.ifSupported(SearchPredicateFactoryExtension, Function)
was supported so far, apply the given consumer to the current (non-extended)SearchPredicateFactory
; otherwise return the predicate created in the first succeedingifSupported
call.PredicateFinalStep
orElseFail()
If no extension passed toSearchPredicateFactoryExtensionIfSupportedStep.ifSupported(SearchPredicateFactoryExtension, Function)
was supported so far, throw an exception; otherwise return the predicate created in the first succeedingifSupported
call.-
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactoryExtensionIfSupportedStep
ifSupported
-
-
-
-
Method Detail
-
orElse
PredicateFinalStep orElse(Function<SearchPredicateFactory,? extends PredicateFinalStep> predicateContributor)
If no extension passed toSearchPredicateFactoryExtensionIfSupportedStep.ifSupported(SearchPredicateFactoryExtension, Function)
was supported so far, apply the given consumer to the current (non-extended)SearchPredicateFactory
; otherwise return the predicate created in the first succeedingifSupported
call.- Parameters:
predicateContributor
- A function called if no extension was successfully applied; it will use the (non-extended) predicate factory passed in parameter to create a predicate, returning the final step in the predicate DSL. Should generally be a lambda expression.- Returns:
- The final step in the DSL of the resulting predicate.
-
orElseFail
PredicateFinalStep orElseFail()
If no extension passed toSearchPredicateFactoryExtensionIfSupportedStep.ifSupported(SearchPredicateFactoryExtension, Function)
was supported so far, throw an exception; otherwise return the predicate created in the first succeedingifSupported
call.- Returns:
- The final step in the DSL of the resulting predicate.
- Throws:
SearchException
- If none of the previously passed extensions was supported.
-
-