Class AbstractCassandraQuery
java.lang.Object
org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
org.springframework.data.cassandra.repository.query.AbstractCassandraQuery
- All Implemented Interfaces:
RepositoryQuery
- Direct Known Subclasses:
PartTreeCassandraQuery
,StringBasedCassandraQuery
Base class for
RepositoryQuery
implementations for Cassandra.- Author:
- Mark Paluch, John Blum
- See Also:
-
Field Summary
Fields inherited from class org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
log
-
Constructor Summary
ConstructorDescriptionAbstractCassandraQuery
(CassandraQueryMethod queryMethod, CassandraOperations operations) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.datastax.oss.driver.api.core.cql.SimpleStatement
createQuery
(CassandraParameterAccessor accessor) Creates aStatement
using the givenParameterAccessor
protected CassandraOperations
Return a reference to theCassandraOperations
used to execute this Cassandra query.protected abstract boolean
Returns whether the query should get a count projection applied.protected abstract boolean
Returns whether the query should get an exists projection applied.protected abstract boolean
Return whether the query has an explicit limit set.protected abstract boolean
Returns whether the query is a modifying query.Methods inherited from class org.springframework.data.cassandra.repository.query.CassandraRepositoryQuerySupport
getEntityInstantiators, getMappingContext, getQueryMethod, getQueryStatementCreator
-
Constructor Details
-
AbstractCassandraQuery
- Parameters:
queryMethod
- must not be null.operations
- must not be null.
-
-
Method Details
-
getOperations
Return a reference to theCassandraOperations
used to execute this Cassandra query.- Returns:
- a reference to the
CassandraOperations
used to execute this Cassandra query. - See Also:
-
execute
-
createQuery
protected abstract com.datastax.oss.driver.api.core.cql.SimpleStatement createQuery(CassandraParameterAccessor accessor) Creates aStatement
using the givenParameterAccessor
- Parameters:
accessor
- must not be null.
-
isCountQuery
protected abstract boolean isCountQuery()Returns whether the query should get a count projection applied.- Returns:
- a boolean value indicating whether the query is a count projection.
- Since:
- 2.1
-
isExistsQuery
protected abstract boolean isExistsQuery()Returns whether the query should get an exists projection applied.- Returns:
- a boolean value indicating whether the query is an exists projection.
- Since:
- 2.1
-
isLimiting
protected abstract boolean isLimiting()Return whether the query has an explicit limit set.- Returns:
- a boolean value indicating whether the query has an explicit limit set.
- Since:
- 2.0.4
-
isModifyingQuery
protected abstract boolean isModifyingQuery()Returns whether the query is a modifying query.- Returns:
- a boolean value indicating whether the query is a modifying query.
- Since:
- 2.2
-