Class AbstractCosmosQuery
java.lang.Object
com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
- Direct Known Subclasses:
PartTreeCosmosQuery,StringBasedCosmosQuery
public abstract class AbstractCosmosQuery
extends Object
implements org.springframework.data.repository.query.RepositoryQuery
Abstract class for cosmos query.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCosmosQuery(CosmosQueryMethod method, CosmosOperations operations) Initialization -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CosmosQuerycreateQuery(CosmosParameterAccessor accessor) Creates a query.Executes theAbstractCosmosQuerywith the given parameters.protected CosmosQueryExecutiongetExecution(CosmosParameterAccessor accessor, org.springframework.data.repository.query.ReturnedType returnedType) Determines the appropriate execution path for a queryGet method of queryprotected booleanReturn whether this is a collection query.protected abstract booleanReturn whether this is a count query.protected abstract booleanReturn whether this is a deletion query.protected abstract booleanReturn whether this is an exists query.protected booleanReturn whether this is a page query.protected booleanReturn whether this is a slice query.
-
Field Details
-
operations
CosmosOperations
-
-
Constructor Details
-
AbstractCosmosQuery
Initialization- Parameters:
method- CosmosQueryMethodoperations- CosmosOperations
-
-
Method Details
-
execute
Executes theAbstractCosmosQuerywith the given parameters.- Specified by:
executein interfaceorg.springframework.data.repository.query.RepositoryQuery- Parameters:
parameters- must not be null.- Returns:
- execution result. Can be null.
-
getExecution
protected CosmosQueryExecution getExecution(CosmosParameterAccessor accessor, org.springframework.data.repository.query.ReturnedType returnedType) Determines the appropriate execution path for a query- Parameters:
accessor- Object for accessing method parametersreturnedType- The return type of the method- Returns:
- the execution type needed to handle the query
-
getQueryMethod
Get method of query- Specified by:
getQueryMethodin interfaceorg.springframework.data.repository.query.RepositoryQuery- Returns:
- CosmosQueryMethod
-
createQuery
Creates a query.- Parameters:
accessor- Cosmos parameter accessor.- Returns:
- a Cosmos query.
-
isDeleteQuery
protected abstract boolean isDeleteQuery()Return whether this is a deletion query.- Returns:
- whether this is a deletion query.
-
isExistsQuery
protected abstract boolean isExistsQuery()Return whether this is an exists query.- Returns:
- whether this is an exists query.
-
isCountQuery
protected abstract boolean isCountQuery()Return whether this is a count query.- Returns:
- whether this is a count query.
-
isPageQuery
protected boolean isPageQuery()Return whether this is a page query.- Returns:
- whether this is a page query.
-
isCollectionQuery
protected boolean isCollectionQuery()Return whether this is a collection query.- Returns:
- whether this is a collection query.
-
isSliceQuery
protected boolean isSliceQuery()Return whether this is a slice query.- Returns:
- whether this is a slice query.
-