AbstractCosmosQuery Class

  • java.lang.Object
    • com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery

Implements

org.springframework.data.repository.query.RepositoryQuery

public abstract class AbstractCosmosQuery
implements org.springframework.data.repository.query.RepositoryQuery

Abstract class for cosmos query.

Field Summary

Modifier and Type Field and Description
protected final CosmosOperations operations

CosmosOperations

Constructor Summary

Constructor Description
AbstractCosmosQuery(CosmosQueryMethod method, CosmosOperations operations)

Initialization

Method Summary

Modifier and Type Method and Description
protected abstract CosmosQuery createQuery(CosmosParameterAccessor accessor)

Creates a query.

Object execute(Object[] parameters)

Executes the AbstractCosmosQuery with the given parameters.

protected CosmosQueryExecution getExecution(CosmosParameterAccessor accessor, ReturnedType returnedType)

Determines the appropriate execution path for a query

CosmosQueryMethod getQueryMethod()

Get method of query

protected boolean isCollectionQuery()

Return whether this is a collection query.

protected abstract boolean isCountQuery()

Return whether this is a count query.

protected abstract boolean isDeleteQuery()

Return whether this is a deletion query.

protected abstract boolean isExistsQuery()

Return whether this is an exists query.

protected boolean isPageQuery()

Return whether this is a page query.

protected boolean isSliceQuery()

Return whether this is a slice query.

Methods inherited from java.lang.Object

Field Details

operations

protected final CosmosOperations operations

CosmosOperations

Constructor Details

AbstractCosmosQuery

public AbstractCosmosQuery(CosmosQueryMethod method, CosmosOperations operations)

Initialization

Parameters:

method - CosmosQueryMethod
operations - CosmosOperations

Method Details

createQuery

protected abstract CosmosQuery createQuery(CosmosParameterAccessor accessor)

Creates a query.

Parameters:

accessor - Cosmos parameter accessor.

Returns:

a Cosmos query.

execute

public Object execute(Object[] parameters)

Executes the AbstractCosmosQuery with the given parameters.

Parameters:

parameters - must not be null.

Returns:

execution result. Can be null.

getExecution

protected CosmosQueryExecution getExecution(CosmosParameterAccessor accessor, ReturnedType returnedType)

Determines the appropriate execution path for a query

Parameters:

accessor - Object for accessing method parameters
returnedType - The return type of the method

Returns:

the execution type needed to handle the query

getQueryMethod

public CosmosQueryMethod getQueryMethod()

Get method of query

Returns:

CosmosQueryMethod

isCollectionQuery

protected boolean isCollectionQuery()

Return whether this is a collection query.

Returns:

whether this is a collection query.

isCountQuery

protected abstract boolean isCountQuery()

Return whether this is a count query.

Returns:

whether this is a count 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.

isPageQuery

protected boolean isPageQuery()

Return whether this is a page query.

Returns:

whether this is a page query.

isSliceQuery

protected boolean isSliceQuery()

Return whether this is a slice query.

Returns:

whether this is a slice query.

Applies to