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 succeedingifSupported
call.If no extension passed toSearchSortFactoryExtensionIfSupportedStep.ifSupported(SearchSortFactoryExtension, Function)
was supported so far, throw an exception; otherwise return the sort created in the first succeedingifSupported
call.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 succeedingifSupported
call.- 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 succeedingifSupported
call.- Returns:
- The final step in the DSL of the resulting sort.
- Throws:
SearchException
- If none of the previously passed extensions was supported.
-