Interface SearchProjectionFactoryExtension<T,R,E>

Type Parameters:
T - The type of extended projection factories. Should generally extend SearchProjectionFactory.
R - The type of entity references in the original SearchProjectionFactory.
E - The type of entities in the original SearchProjectionFactory.
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.

See Also:
  • Method Details

    • extendOptional

      Optional<T> extendOptional(SearchProjectionFactory<R,E> original)
      Attempt to extend a given factory, returning an empty Optional in case of failure.

      WARNING: this method is not API, see comments at the type level.

      Parameters:
      original - The original, non-extended SearchProjectionFactory.
      Returns:
      An optional containing the extended projection factory (T) in case of success, or an empty optional otherwise.