public class ElasticsearchQueryMethod
extends org.springframework.data.repository.query.QueryMethod
| Constructor and Description |
|---|
ElasticsearchQueryMethod(Method method,
org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata,
org.springframework.data.projection.ProjectionFactory factory,
org.springframework.data.mapping.context.MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext) |
| Modifier and Type | Method and Description |
|---|---|
HighlightQuery |
getAnnotatedHighlightQuery() |
String |
getAnnotatedQuery() |
ElasticsearchEntityMetadata<?> |
getEntityInformation() |
protected org.springframework.data.mapping.context.MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> |
getMappingContext() |
boolean |
hasAnnotatedHighlight() |
boolean |
hasAnnotatedQuery() |
boolean |
hasCountQueryAnnotation() |
protected boolean |
isAllowedGenericType(ParameterizedType methodGenericReturnType) |
boolean |
isNotSearchHitMethod()
checks whether the return type of the underlying method nether a
SearchHits nor a collection of
SearchHit. |
boolean |
isNotSearchPageMethod()
checks if the return type is not
SearchPage. |
boolean |
isSearchHitMethod()
checks whether the return type of the underlying method is a
SearchHits or a collection of
SearchHit. |
boolean |
isSearchPageMethod()
checks if the return type is
SearchPage. |
Class<?> |
methodReturnType()
returns the declared return type for this method.
|
protected void |
verifyCountQueryTypes() |
createParameters, getDomainClass, getName, getNamedQueryName, getParameters, getResultProcessor, getReturnedObjectType, isCollectionQuery, isModifyingQuery, isPageQuery, isQueryForEntity, isSliceQuery, isStreamQuery, toStringprotected final Method method
public ElasticsearchQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata, org.springframework.data.projection.ProjectionFactory factory, org.springframework.data.mapping.context.MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext)
protected void verifyCountQueryTypes()
public boolean hasAnnotatedQuery()
public String getAnnotatedQuery()
hasAnnotatedQuery() returns truepublic boolean hasAnnotatedHighlight()
Highlight annotation present.public HighlightQuery getAnnotatedHighlightQuery()
HighlightQuery built from the Highlight annotation.IllegalArgumentException - if no Highlight annotation is present on the methodhasAnnotatedHighlight()public ElasticsearchEntityMetadata<?> getEntityInformation()
getEntityInformation in class org.springframework.data.repository.query.QueryMethodElasticsearchEntityMetadata for the query methods return type.protected org.springframework.data.mapping.context.MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> getMappingContext()
public boolean isSearchHitMethod()
SearchHits or a collection of
SearchHit.SearchHitt related return typepublic boolean isSearchPageMethod()
SearchPage.public Class<?> methodReturnType()
protected boolean isAllowedGenericType(ParameterizedType methodGenericReturnType)
public boolean isNotSearchHitMethod()
SearchHits nor a collection of
SearchHit.SearchHitt related return
typepublic boolean isNotSearchPageMethod()
SearchPage.public boolean hasCountQueryAnnotation()
CountQuery or with Query(count =true)Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.