Class ElasticsearchExtension<H,R,E,LOS>
- Type Parameters:
H
- The type of query hits. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get()
.R
- The entity reference type for projections. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get()
.E
- The entity type for projections. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get()
.LOS
- The type of the initial step of the loading options definition DSL. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get()
.
- All Implemented Interfaces:
IndexFieldTypeFactoryExtension<ElasticsearchIndexFieldTypeFactory>
,SchemaExportExtension<ElasticsearchIndexSchemaExport>
,SearchAggregationFactoryExtension<ElasticsearchSearchAggregationFactory>
,SearchPredicateFactoryExtension<ElasticsearchSearchPredicateFactory>
,SearchProjectionFactoryExtension<ElasticsearchSearchProjectionFactory<R,
,E>, R, E> SearchQueryDslExtension<ElasticsearchSearchQuerySelectStep<R,
,E, LOS>, R, E, LOS> SearchQueryExtension<ElasticsearchSearchQuery<H>,
,H> SearchSortFactoryExtension<ElasticsearchSearchSortFactory>
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionextendOptional
(SearchAggregationFactory original) Attempt to extend a given factory, returning an emptyOptional
in case of failure.extendOptional
(SearchPredicateFactory original) Attempt to extend a given factory, returning an emptyOptional
in case of failure.extendOptional
(SearchProjectionFactory<R, E> original) Attempt to extend a given factory, returning an emptyOptional
in case of failure.extendOptional
(SearchQuerySelectStep<?, R, E, LOS, ?, ?> original, SearchQueryIndexScope<?> scope, BackendSessionContext sessionContext, SearchLoadingContextBuilder<E, LOS> loadingContextBuilder) Attempt to extend a given DSL step, returning an emptyOptional
in case of failure.extendOptional
(SearchQuery<H> original, SearchLoadingContext<?> loadingContext) Attempt to extend a given query, returning an emptyOptional
in case of failure.extendOptional
(SearchSortFactory original) Attempt to extend a given factory, returning an emptyOptional
in case of failure.extendOrFail
(IndexFieldTypeFactory original) Attempt to extend a given factory, throwing an exception in case of failure.extendOrFail
(SchemaExport original) Attempt to extend a given export, throwing an exception in case of failure.static <H,
R, E, LOS>
ElasticsearchExtension<H, R, E, LOS> get()
Get the extension with generic parameters automatically set as appropriate for the context in which it's used.
-
Method Details
-
get
Get the extension with generic parameters automatically set as appropriate for the context in which it's used.- Type Parameters:
H
- The type of query hits. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get() )
.R
- The entity reference type for projections. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get() )
.E
- The entity type for projections. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get() )
.LOS
- The type of the initial step of the loading options definition DSL. Users should not have to care about this, as the parameter will automatically take the appropriate value when calling.extension( ElasticsearchExtension.get() )
.- Returns:
- The extension.
-
extendOptional
public Optional<ElasticsearchSearchQuerySelectStep<R,E, extendOptionalLOS>> (SearchQuerySelectStep<?, R, E, LOS, ?, ?> original, SearchQueryIndexScope<?> scope, BackendSessionContext sessionContext, SearchLoadingContextBuilder<E, LOS> loadingContextBuilder) Attempt to extend a given DSL step, returning an emptyOptional
in case of failure.WARNING: this method is not API, see comments at the type level.
- Specified by:
extendOptional
in interfaceSearchQueryDslExtension<H,
R, E, LOS> - Parameters:
original
- The original, non-extendedSearchQuerySelectStep
.scope
- ASearchQueryIndexScope
.sessionContext
- ABackendSessionContext
.loadingContextBuilder
- ASearchLoadingContextBuilder
.- Returns:
- An optional containing the extended search query DSL step (
SearchQueryDslExtension
) in case of success, or an empty optional otherwise.
-
extendOptional
public Optional<ElasticsearchSearchQuery<H>> extendOptional(SearchQuery<H> original, SearchLoadingContext<?> loadingContext) Attempt to extend a given query, returning an emptyOptional
in case of failure.WARNING: this method is not API, see comments at the type level.
- Specified by:
extendOptional
in interfaceSearchQueryExtension<H,
R> - Parameters:
original
- The original, non-extendedSearchQuery
.loadingContext
- TheSearchLoadingContext
used by the original query.- Returns:
- An optional containing the extended search query (
SearchQueryExtension
) in case of success, or an empty optional otherwise.
-
extendOptional
public Optional<ElasticsearchSearchPredicateFactory> extendOptional(SearchPredicateFactory original) 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.
- Specified by:
extendOptional
in interfaceSearchPredicateFactoryExtension<H>
- Parameters:
original
- The original, non-extendedSearchPredicateFactory
.- Returns:
- An optional containing the extended search predicate factory (
SearchPredicateFactoryExtension
) in case of success, or an empty optional otherwise.
-
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.
- Specified by:
extendOptional
in interfaceSearchSortFactoryExtension<H>
- Parameters:
original
- The original, non-extendedSearchSortFactory
.- Returns:
- An optional containing the extended sort factory (
SearchSortFactoryExtension
) in case of success, or an empty optional otherwise.
-
extendOptional
public Optional<ElasticsearchSearchProjectionFactory<R,E>> extendOptional(SearchProjectionFactory<R, E> original) 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.
- Specified by:
extendOptional
in interfaceSearchProjectionFactoryExtension<H,
R, E> - Parameters:
original
- The original, non-extendedSearchProjectionFactory
.- Returns:
- An optional containing the extended projection factory (
SearchProjectionFactoryExtension
) in case of success, or an empty optional otherwise.
-
extendOptional
public Optional<ElasticsearchSearchAggregationFactory> extendOptional(SearchAggregationFactory original) 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.
- Specified by:
extendOptional
in interfaceSearchAggregationFactoryExtension<H>
- Parameters:
original
- The original, non-extendedSearchAggregationFactory
.- Returns:
- An optional containing the extended aggregation factory (
SearchAggregationFactoryExtension
) in case of success, or an empty optional otherwise.
-
extendOrFail
Attempt to extend a given factory, throwing an exception in case of failure.WARNING: this method is not API, see comments at the type level.
- Specified by:
extendOrFail
in interfaceIndexFieldTypeFactoryExtension<H>
- Parameters:
original
- The original, non-extendedIndexFieldTypeFactory
.- Returns:
- An extended index field type factory (
IndexFieldTypeFactoryExtension
)
-
extendOrFail
Attempt to extend a given export, throwing an exception in case of failure.WARNING: this method is not API, see comments at the type level.
- Specified by:
extendOrFail
in interfaceSchemaExportExtension<H>
- Parameters:
original
- The original, non-extendedSchemaExport
.- Returns:
- An extended
index schema export
.
-