Interface SearchProjectionFactoryExtensionIfSupportedStep<P,R,E>
- Type Parameters:
R
- The type of entity references in the parentSearchProjectionFactory
.E
- The type of entities in the parentSearchProjectionFactory
.P
- The resulting projection type.
- All Known Subinterfaces:
SearchProjectionFactoryExtensionIfSupportedMoreStep<P,
R, E>
public interface SearchProjectionFactoryExtensionIfSupportedStep<P,R,E>
The initial step when attempting to apply multiple extensions
to a
SearchProjectionFactory
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionifSupported
(SearchProjectionFactoryExtension<T, R, E> extension, Function<T, ? extends ProjectionFinalStep<P>> projectionContributor) If the given extension is supported, and none of the previous extensions passed toifSupported(SearchProjectionFactoryExtension, Function)
was supported, extend the current factory with this extension, apply the given function to the extended factory, and store the resulting projection for later retrieval.
-
Method Details
-
ifSupported
<T> SearchProjectionFactoryExtensionIfSupportedMoreStep<P,R, ifSupportedE> (SearchProjectionFactoryExtension<T, R, E> extension, Function<T, ? extends ProjectionFinalStep<P>> projectionContributor) If the given extension is supported, and none of the previous extensions passed toifSupported(SearchProjectionFactoryExtension, Function)
was supported, extend the current factory with this extension, apply the given function to the extended factory, and store the resulting projection for later retrieval.This method cannot be called after
SearchProjectionFactoryExtensionIfSupportedMoreStep.orElse(Function)
orSearchProjectionFactoryExtensionIfSupportedMoreStep.orElseFail()
.- Type Parameters:
T
- The type of the extended factory.- Parameters:
extension
- The extension to apply.projectionContributor
- A function called if the extension is successfully applied; it will use the (extended) projection factory passed in parameter to create a projection, returning the final step in the projection DSL. Should generally be a lambda expression.- Returns:
this
, for method chaining.
-