Class CosmosQueryMethod
java.lang.Object
org.springframework.data.repository.query.QueryMethod
com.azure.spring.data.cosmos.repository.query.CosmosQueryMethod
public class CosmosQueryMethod
extends org.springframework.data.repository.query.QueryMethod
Inherit QueryMethod class to generate a method that is designated to execute a finder query.
-
Constructor Summary
ConstructorsConstructorDescriptionCosmosQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory) Creates a newCosmosQueryMethodfrom the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.repository.core.EntityMetadata<?> Returns the query string declared in aQueryannotation or null if neither the annotation found nor the attribute was specified.booleanReturns whether the method has an annotated query.Methods inherited from class org.springframework.data.repository.query.QueryMethod
createParameters, createParameters, getDomainClass, getName, getNamedQueryName, getParameters, getResultProcessor, getReturnedObjectType, isCollectionQuery, isModifyingQuery, isPageQuery, isQueryForEntity, isScrollQuery, isSliceQuery, isStreamQuery, toString
-
Constructor Details
-
CosmosQueryMethod
public CosmosQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory) Creates a newCosmosQueryMethodfrom the given parameters. Looks up the correct query to use for following invocations of the method given.- Parameters:
method- must not be null.metadata- must not be null.factory- must not be null.
-
-
Method Details
-
getEntityInformation
public org.springframework.data.repository.core.EntityMetadata<?> getEntityInformation()- Overrides:
getEntityInformationin classorg.springframework.data.repository.query.QueryMethod
-
hasAnnotatedQuery
public boolean hasAnnotatedQuery()Returns whether the method has an annotated query.- Returns:
- if the query method has an annotated query
-
getQueryAnnotation
Returns the query string declared in aQueryannotation or null if neither the annotation found nor the attribute was specified.- Returns:
- the query string or null
-