Interface SearchSortFactoryExtensionIfSupportedMoreStep
- All Superinterfaces:
SearchSortFactoryExtensionIfSupportedStep
public interface SearchSortFactoryExtensionIfSupportedMoreStep
extends SearchSortFactoryExtensionIfSupportedStep
The second and later step when attempting to apply multiple extensions
to a
SearchSortFactory.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorElse(Function<SearchSortFactory, ? extends SortFinalStep> sortContributor) If no extension passed toSearchSortFactoryExtensionIfSupportedStep.ifSupported(SearchSortFactoryExtension, Function)was supported so far, apply the given consumer to the current (non-extended)SearchSortFactory; otherwise return the sort created in the first succeedingifSupportedcall.If no extension passed toSearchSortFactoryExtensionIfSupportedStep.ifSupported(SearchSortFactoryExtension, Function)was supported so far, throw an exception; otherwise return the sort created in the first succeedingifSupportedcall.Methods inherited from interface org.hibernate.search.engine.search.sort.dsl.SearchSortFactoryExtensionIfSupportedStep
ifSupported
-
Method Details
-
orElse
If no extension passed toSearchSortFactoryExtensionIfSupportedStep.ifSupported(SearchSortFactoryExtension, Function)was supported so far, apply the given consumer to the current (non-extended)SearchSortFactory; otherwise return the sort created in the first succeedingifSupportedcall.- Parameters:
sortContributor- A function called if no extension was successfully applied; it will use the (non-extended) sort factory passed in parameter to create a sort, returning the final step in the sort DSL. Should generally be a lambda expression.- Returns:
- The final step in the DSL of the resulting sort.
-
orElseFail
SortThenStep orElseFail()If no extension passed toSearchSortFactoryExtensionIfSupportedStep.ifSupported(SearchSortFactoryExtension, Function)was supported so far, throw an exception; otherwise return the sort created in the first succeedingifSupportedcall.- Returns:
- The final step in the DSL of the resulting sort.
- Throws:
org.hibernate.search.util.common.SearchException- If none of the previously passed extensions was supported.
-