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
ConstructorDescriptionReactiveStringBasedCassandraQuery
(String query, ReactiveCassandraQueryMethod method, ReactiveCassandraOperations operations, org.springframework.expression.ExpressionParser expressionParser, org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) Create a newReactiveStringBasedCassandraQuery
for 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 newReactiveStringBasedCassandraQuery
for 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 givenParameterAccessor
protected org.springframework.data.cassandra.repository.query.StringBasedQuery
protected boolean
Returns whether the query should get a count projection applied.protected boolean
Returns whether the query should get an exists projection applied.protected boolean
Return whether the query has an explicit limit set.protected boolean
Returns whether the query is a modifying query.Methods inherited from class org.springframework.data.cassandra.repository.query.AbstractReactiveCassandraQuery
execute, getQueryMethod, getReactiveCassandraOperations
Methods 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 newReactiveStringBasedCassandraQuery
for the givenCassandraQueryMethod
,ReactiveCassandraOperations
,SpelExpressionParser
, andQueryMethodEvaluationContextProvider
.- Parameters:
queryMethod
-ReactiveCassandraQueryMethod
on which this query is based.operations
-ReactiveCassandraOperations
used to perform data access in Cassandra.expressionParser
-SpelExpressionParser
used to parse expressions in the query.evaluationContextProvider
-QueryMethodEvaluationContextProvider
used 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 newReactiveStringBasedCassandraQuery
for the givenquery
,CassandraQueryMethod
,ReactiveCassandraOperations
,SpelExpressionParser
, andQueryMethodEvaluationContextProvider
.- Parameters:
method
-ReactiveCassandraQueryMethod
on which this query is based.operations
-ReactiveCassandraOperations
used to perform data access in Cassandra.expressionParser
-SpelExpressionParser
used to parse expressions in the query.evaluationContextProvider
-QueryMethodEvaluationContextProvider
used 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:AbstractReactiveCassandraQuery
Creates a string query using the givenParameterAccessor
- Specified by:
createQuery
in classAbstractReactiveCassandraQuery
- Parameters:
parameterAccessor
- must not be null.
-
isCountQuery
protected boolean isCountQuery()Description copied from class:AbstractReactiveCassandraQuery
Returns whether the query should get a count projection applied.- Specified by:
isCountQuery
in classAbstractReactiveCassandraQuery
- Returns:
- a boolean value indicating whether the query is a count projection.
-
isExistsQuery
protected boolean isExistsQuery()Description copied from class:AbstractReactiveCassandraQuery
Returns whether the query should get an exists projection applied.- Specified by:
isExistsQuery
in classAbstractReactiveCassandraQuery
- Returns:
- a boolean value indicating whether the query is an exists projection.
-
isLimiting
protected boolean isLimiting()Description copied from class:AbstractReactiveCassandraQuery
Return whether the query has an explicit limit set.- Specified by:
isLimiting
in classAbstractReactiveCassandraQuery
- Returns:
- a boolean value indicating whether the query has an explicit limit set.
-
isModifyingQuery
protected boolean isModifyingQuery()Description copied from class:AbstractReactiveCassandraQuery
Returns whether the query is a modifying query.- Specified by:
isModifyingQuery
in classAbstractReactiveCassandraQuery
- Returns:
- a boolean value indicating whether the query is a modifying query.
-