Class StringBasedCosmosQuery
java.lang.Object
com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery
com.azure.spring.data.cosmos.repository.support.StringBasedCosmosQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
Cosmos query class to handle the annotated queries. This overrides the execution and runs the query directly
-
Field Summary
Fields inherited from class com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery
operations
-
Constructor Summary
ConstructorDescriptionStringBasedCosmosQuery
(CosmosQueryMethod queryMethod, CosmosOperations dbOperations) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected CosmosQuery
createQuery
(CosmosParameterAccessor accessor) Creates a query.Executes theAbstractCosmosQuery
with the given parameters.protected boolean
protected boolean
protected boolean
Methods inherited from class com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery
getExecution, getQueryMethod, isCollectionQuery, isPageQuery, isSliceQuery
-
Constructor Details
-
StringBasedCosmosQuery
Constructor- Parameters:
queryMethod
- the CosmosQueryMethoddbOperations
- the CosmosOperations
-
-
Method Details
-
createQuery
Description copied from class:AbstractCosmosQuery
Creates a query.- Specified by:
createQuery
in classAbstractCosmosQuery
- Parameters:
accessor
- Cosmos parameter accessor.- Returns:
- a Cosmos query.
-
execute
Description copied from class:AbstractCosmosQuery
Executes theAbstractCosmosQuery
with the given parameters.- Specified by:
execute
in interfaceorg.springframework.data.repository.query.RepositoryQuery
- Overrides:
execute
in classAbstractCosmosQuery
- Parameters:
parameters
- must not be null.- Returns:
- execution result. Can be null.
-
isDeleteQuery
protected boolean isDeleteQuery()- Specified by:
isDeleteQuery
in classAbstractCosmosQuery
- Returns:
- whether this is a deletion query.
-
isExistsQuery
protected boolean isExistsQuery()- Specified by:
isExistsQuery
in classAbstractCosmosQuery
- Returns:
- whether this is an exists query.
-
isCountQuery
protected boolean isCountQuery()- Specified by:
isCountQuery
in classAbstractCosmosQuery
- Returns:
- whether this is a count query.
-