R
- The reference type for projections.
Users should not have to care about this, as the parameter will automatically take the appropriate value when calling
.extension( LuceneExtension.get()
.O
- The loaded object type for projections.
Users should not have to care about this, as the parameter will automatically take the appropriate value when calling
.extension( LuceneExtension.get()
.public final class LuceneExtension<R,O> extends Object implements SearchPredicateFactoryContextExtension<LuceneSearchPredicateFactoryContext>, SearchSortContainerContextExtension<LuceneSearchSortContainerContext>, SearchProjectionFactoryContextExtension<LuceneSearchProjectionFactoryContext<R,O>,R,O>, IndexFieldTypeFactoryContextExtension<LuceneIndexFieldTypeFactoryContext>
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 directly by users. In short, users are only expected to get instances of this type from an API and pass it to another API.
public static <R,O> LuceneExtension<R,O> get()
public <C,B> Optional<LuceneSearchPredicateFactoryContext> extendOptional(SearchPredicateFactoryContext original, SearchPredicateBuilderFactory<C,B> factory)
Optional
in case of failure.
WARNING: this method is not API, see comments at the type level.
extendOptional
in interface SearchPredicateFactoryContextExtension<LuceneSearchPredicateFactoryContext>
C
- The type of query element collector for the given predicate builder factory.B
- The implementation type of builders for the given predicate builder factory.original
- The original, non-extended SearchPredicateFactoryContext
.factory
- A SearchPredicateBuilderFactory
.T
) in case
of success, or an empty optional otherwise.public <C,B> Optional<LuceneSearchSortContainerContext> extendOptional(SearchSortContainerContext original, SearchSortBuilderFactory<C,B> factory, SearchSortDslContext<? super B> dslContext)
Optional
in case of failure.
WARNING: this method is not API, see comments at the type level.
extendOptional
in interface SearchSortContainerContextExtension<LuceneSearchSortContainerContext>
C
- The type of query element collector for the given sort builder factory.B
- The implementation type of builders for the given sort builder factory.original
- The original, non-extended SearchSortContainerContext
.factory
- A SearchSortBuilderFactory
.dslContext
- A SearchSortDslContext
.T
) in case
of success, or an empty optional otherwise.public Optional<LuceneSearchProjectionFactoryContext<R,O>> extendOptional(SearchProjectionFactoryContext<R,O> original, SearchProjectionBuilderFactory factory)
Optional
in case of failure.
WARNING: this method is not API, see comments at the type level.
extendOptional
in interface SearchProjectionFactoryContextExtension<LuceneSearchProjectionFactoryContext<R,O>,R,O>
original
- The original, non-extended SearchProjectionFactoryContext
.factory
- A SearchProjectionBuilderFactory
.T
) in case
of success, or an empty optional otherwise.public LuceneIndexFieldTypeFactoryContext extendOrFail(IndexFieldTypeFactoryContext original)
WARNING: this method is not API, see comments at the type level.
extendOrFail
in interface IndexFieldTypeFactoryContextExtension<LuceneIndexFieldTypeFactoryContext>
original
- The original, non-extended IndexFieldTypeFactoryContext
.T
)Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.