Interface SearchProjectionFactoryExtension<T,R,E>
- Type Parameters:
T
- The type of extended projection factories. Should generally extendSearchProjectionFactory
.R
- The type of entity references in the originalSearchProjectionFactory
.E
- The type of entities in the originalSearchProjectionFactory
.
- All Known Implementing Classes:
ElasticsearchExtension
,LuceneExtension
public interface SearchProjectionFactoryExtension<T,R,E>
An extension to the search projection DSL, allowing the use of non-standard projections in a query.
WARNING: while this type is API, because instances should be manipulated by users,
all of its methods are considered SPIs and therefore should never be called or implemented directly by users.
In short, users are only expected to get instances of this type from an API (SomeExtension.get()
)
and pass it to another API.
-
Method Summary
Modifier and TypeMethodDescriptionextendOptional
(SearchProjectionFactory<R, E> original) Attempt to extend a given factory, returning an emptyOptional
in case of failure.
-
Method Details
-
extendOptional
Attempt to extend a given factory, returning an emptyOptional
in case of failure.WARNING: this method is not API, see comments at the type level.
- Parameters:
original
- The original, non-extendedSearchProjectionFactory
.- Returns:
- An optional containing the extended projection factory (
SearchProjectionFactoryExtension
) in case of success, or an empty optional otherwise.
-