Class ReactiveStringBasedCassandraQuery
java.lang.Object
org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
org.springframework.data.cassandra.repository.query.AbstractReactiveCassandraQuery
org.springframework.data.cassandra.repository.query.ReactiveStringBasedCassandraQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
String-based
AbstractReactiveCassandraQuery implementation.
A ReactiveStringBasedCassandraQuery expects a query method to be annotated with
Query with a CQL query. String-based queries support named,
index-based and expression parameters that are resolved during query execution.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Field Summary
Fields inherited from class org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
log -
Constructor Summary
ConstructorsConstructorDescriptionReactiveStringBasedCassandraQuery(String query, ReactiveCassandraQueryMethod method, ReactiveCassandraOperations operations, org.springframework.expression.ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) Create a newReactiveStringBasedCassandraQueryfor the givenquery,CassandraQueryMethod,ReactiveCassandraOperations,SpelExpressionParser, andQueryMethodEvaluationContextProvider.ReactiveStringBasedCassandraQuery(ReactiveCassandraQueryMethod queryMethod, ReactiveCassandraOperations operations, org.springframework.expression.ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) Create a newReactiveStringBasedCassandraQueryfor the givenCassandraQueryMethod,ReactiveCassandraOperations,SpelExpressionParser, andQueryMethodEvaluationContextProvider. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<com.datastax.oss.driver.api.core.cql.SimpleStatement>createQuery(CassandraParameterAccessor parameterAccessor) Creates a string query using the givenParameterAccessorprotected org.springframework.data.cassandra.repository.query.StringBasedQueryprotected booleanReturns whether the query should get a count projection applied.protected booleanReturns whether the query should get an exists projection applied.protected booleanReturn whether the query has an explicit limit set.protected booleanReturns whether the query is a modifying query.Methods inherited from class org.springframework.data.cassandra.repository.query.AbstractReactiveCassandraQuery
execute, getQueryMethod, getReactiveCassandraOperationsMethods inherited from class org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
getEntityInstantiators, getMappingContext, getQueryStatementCreator
-
Constructor Details
-
ReactiveStringBasedCassandraQuery
public ReactiveStringBasedCassandraQuery(ReactiveCassandraQueryMethod queryMethod, ReactiveCassandraOperations operations, org.springframework.expression.ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) Create a newReactiveStringBasedCassandraQueryfor the givenCassandraQueryMethod,ReactiveCassandraOperations,SpelExpressionParser, andQueryMethodEvaluationContextProvider.- Parameters:
queryMethod-ReactiveCassandraQueryMethodon which this query is based.operations-ReactiveCassandraOperationsused to perform data access in Cassandra.expressionParser-SpelExpressionParserused to parse expressions in the query.evaluationContextProvider-QueryMethodEvaluationContextProviderused to access the potentially sharedStandardEvaluationContext.- See Also:
-
ReactiveStringBasedCassandraQuery
public ReactiveStringBasedCassandraQuery(String query, ReactiveCassandraQueryMethod method, ReactiveCassandraOperations operations, org.springframework.expression.ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) Create a newReactiveStringBasedCassandraQueryfor the givenquery,CassandraQueryMethod,ReactiveCassandraOperations,SpelExpressionParser, andQueryMethodEvaluationContextProvider.- Parameters:
method-ReactiveCassandraQueryMethodon which this query is based.operations-ReactiveCassandraOperationsused to perform data access in Cassandra.expressionParser-SpelExpressionParserused to parse expressions in the query.evaluationContextProvider-QueryMethodEvaluationContextProviderused to access the potentially sharedStandardEvaluationContext.- See Also:
-
-
Method Details
-
getStringBasedQuery
protected org.springframework.data.cassandra.repository.query.StringBasedQuery getStringBasedQuery() -
createQuery
public reactor.core.publisher.Mono<com.datastax.oss.driver.api.core.cql.SimpleStatement> createQuery(CassandraParameterAccessor parameterAccessor) Description copied from class:AbstractReactiveCassandraQueryCreates a string query using the givenParameterAccessor- Specified by:
createQueryin classAbstractReactiveCassandraQuery- Parameters:
parameterAccessor- must not be null.
-
isCountQuery
protected boolean isCountQuery()Description copied from class:AbstractReactiveCassandraQueryReturns whether the query should get a count projection applied.- Specified by:
isCountQueryin classAbstractReactiveCassandraQuery- Returns:
- a boolean value indicating whether the query is a count projection.
-
isExistsQuery
protected boolean isExistsQuery()Description copied from class:AbstractReactiveCassandraQueryReturns whether the query should get an exists projection applied.- Specified by:
isExistsQueryin classAbstractReactiveCassandraQuery- Returns:
- a boolean value indicating whether the query is an exists projection.
-
isLimiting
protected boolean isLimiting()Description copied from class:AbstractReactiveCassandraQueryReturn whether the query has an explicit limit set.- Specified by:
isLimitingin classAbstractReactiveCassandraQuery- Returns:
- a boolean value indicating whether the query has an explicit limit set.
-
isModifyingQuery
protected boolean isModifyingQuery()Description copied from class:AbstractReactiveCassandraQueryReturns whether the query is a modifying query.- Specified by:
isModifyingQueryin classAbstractReactiveCassandraQuery- Returns:
- a boolean value indicating whether the query is a modifying query.
-