Interface SearchPredicateFactoryExtensionIfSupportedMoreStep
- All Superinterfaces:
SearchPredicateFactoryExtensionIfSupportedStep
public interface SearchPredicateFactoryExtensionIfSupportedMoreStep
extends SearchPredicateFactoryExtensionIfSupportedStep
The second and later step when attempting to apply multiple extensions
to a
SearchPredicateFactory.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorElse(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 succeedingifSupportedcall.If no extension passed toSearchPredicateFactoryExtensionIfSupportedStep.ifSupported(SearchPredicateFactoryExtension, Function)was supported so far, throw an exception; otherwise return the predicate created in the first succeedingifSupportedcall.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactoryExtensionIfSupportedStep
ifSupported
-
Method Details
-
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 succeedingifSupportedcall.- 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 succeedingifSupportedcall.- Returns:
- The final step in the DSL of the resulting predicate.
- Throws:
SearchException- If none of the previously passed extensions was supported.
-