R - The type of entity references in the parent SearchProjectionFactory.E - The type of entities in the parent SearchProjectionFactory.P - The resulting projection type.public interface SearchProjectionFactoryExtensionIfSupportedMoreStep<P,R,E> extends SearchProjectionFactoryExtensionIfSupportedStep<P,R,E>
SearchProjectionFactory.SearchProjectionFactory.extension()| Modifier and Type | Method and Description |
|---|---|
ProjectionFinalStep<P> |
orElse(Function<SearchProjectionFactory<R,E>,? extends ProjectionFinalStep<P>> projectionContributor)
If no extension passed to
SearchProjectionFactoryExtensionIfSupportedStep.ifSupported(SearchProjectionFactoryExtension, Function)
was supported so far, apply the given function to the current (non-extended) SearchProjectionFactory;
otherwise return the projection created in the first succeeding ifSupported call. |
ProjectionFinalStep<P> |
orElseFail()
If no extension passed to
SearchProjectionFactoryExtensionIfSupportedStep.ifSupported(SearchProjectionFactoryExtension, Function)
was supported so far, throw an exception;
otherwise return the projection created in the first succeeding ifSupported call. |
ifSupportedProjectionFinalStep<P> orElse(Function<SearchProjectionFactory<R,E>,? extends ProjectionFinalStep<P>> projectionContributor)
SearchProjectionFactoryExtensionIfSupportedStep.ifSupported(SearchProjectionFactoryExtension, Function)
was supported so far, apply the given function to the current (non-extended) SearchProjectionFactory;
otherwise return the projection created in the first succeeding ifSupported call.projectionContributor - A function called if no extension was successfully applied;
it will use the (non-extended) projection factory passed in parameter to create a projection,
returning the final step in the projection DSL.
Should generally be a lambda expression.ProjectionFinalStep<P> orElseFail()
SearchProjectionFactoryExtensionIfSupportedStep.ifSupported(SearchProjectionFactoryExtension, Function)
was supported so far, throw an exception;
otherwise return the projection created in the first succeeding ifSupported call.SearchException - If none of the previously passed extensions was supported.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.