Class AbstractReactiveCosmosQuery
java.lang.Object
com.azure.spring.data.cosmos.repository.query.AbstractReactiveCosmosQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
- Direct Known Subclasses:
PartTreeReactiveCosmosQuery,StringBasedReactiveCosmosQuery
public abstract class AbstractReactiveCosmosQuery
extends Object
implements org.springframework.data.repository.query.RepositoryQuery
Abstract class for reactive cosmos query.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReactiveCosmosOperationsReactive Cosmos operations -
Constructor Summary
ConstructorsConstructorDescriptionAbstractReactiveCosmosQuery(ReactiveCosmosQueryMethod method, ReactiveCosmosOperations operations) Initialization -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CosmosQuerycreateQuery(ReactiveCosmosParameterAccessor accessor) Creates a query.Executes theAbstractReactiveCosmosQuerywith the given parameters.protected ReactiveCosmosQueryExecutiongetExecution(org.springframework.data.repository.query.ReturnedType returnedType) Determines the appropriate execution path for a reactive queryGet method of queryprotected 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.
-
Field Details
-
operations
Reactive Cosmos operations
-
-
Constructor Details
-
AbstractReactiveCosmosQuery
public AbstractReactiveCosmosQuery(ReactiveCosmosQueryMethod method, ReactiveCosmosOperations operations) Initialization- Parameters:
method- ReactiveCosmosQueryMethodoperations- ReactiveCosmosOperations
-
-
Method Details
-
execute
Executes theAbstractReactiveCosmosQuerywith 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 ReactiveCosmosQueryExecution getExecution(org.springframework.data.repository.query.ReturnedType returnedType) Determines the appropriate execution path for a reactive query- Parameters:
returnedType- The return type of the method- Returns:
- the execution type needed to handle the query
- Throws:
IllegalArgumentException- if execution requires paging
-
getQueryMethod
Get method of query- Specified by:
getQueryMethodin interfaceorg.springframework.data.repository.query.RepositoryQuery- Returns:
- ReactiveCosmosQueryMethod
-
createQuery
Creates a query.- Parameters:
accessor- Reactive 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.
-