public class CassandraQueryMethod extends QueryMethod
QueryMethod.| Constructor and Description |
|---|
CassandraQueryMethod(Method method,
RepositoryMetadata repositoryMetadata,
ProjectionFactory projectionFactory,
MappingContext<? extends CassandraPersistentEntity<?>,? extends CassandraPersistentProperty> mappingContext)
Create a new
CassandraQueryMethod from the given Method. |
| Modifier and Type | Method and Description |
|---|---|
protected CassandraParameters |
createParameters(Method method) |
String |
getAnnotatedQuery()
Returns the query string declared in a
Query annotation or null if neither the annotation found
nor the attribute was specified. |
protected Class<?> |
getDomainClass() |
CassandraEntityMetadata<?> |
getEntityInformation() |
CassandraParameters |
getParameters() |
com.datastax.driver.core.ConsistencyLevel |
getRequiredAnnotatedConsistencyLevel()
Returns the
ConsistencyLevel in a Query annotation or throws IllegalStateException if the
annotation was not found. |
String |
getRequiredAnnotatedQuery()
Returns the required query string declared in a
Query annotation or throws IllegalStateException if
neither the annotation found nor the attribute was specified. |
TypeInformation<?> |
getReturnType() |
boolean |
hasAnnotatedQuery()
Returns whether the method has an annotated query.
|
boolean |
hasConsistencyLevel() |
boolean |
isResultSetQuery() |
void |
verify(Method method,
RepositoryMetadata metadata)
Validates that this query is not a page query.
|
getName, getNamedQueryName, getResultProcessor, getReturnedObjectType, isCollectionQuery, isModifyingQuery, isPageQuery, isQueryForEntity, isSliceQuery, isStreamQuery, toStringpublic CassandraQueryMethod(Method method, RepositoryMetadata repositoryMetadata, ProjectionFactory projectionFactory, MappingContext<? extends CassandraPersistentEntity<?>,? extends CassandraPersistentProperty> mappingContext)
CassandraQueryMethod from the given Method.method - must not be null.repositoryMetadata - must not be null.projectionFactory - must not be null.mappingContext - must not be null.public void verify(Method method, RepositoryMetadata metadata)
public CassandraEntityMetadata<?> getEntityInformation()
getEntityInformation in class QueryMethodpublic CassandraParameters getParameters()
getParameters in class QueryMethodprotected CassandraParameters createParameters(Method method)
createParameters in class QueryMethodpublic boolean hasAnnotatedQuery()
@Nullable public String getAnnotatedQuery()
Query annotation or null if neither the annotation found
nor the attribute was specified.public boolean hasConsistencyLevel()
ConsistencyLevel.public com.datastax.driver.core.ConsistencyLevel getRequiredAnnotatedConsistencyLevel()
throws IllegalStateException
ConsistencyLevel in a Query annotation or throws IllegalStateException if the
annotation was not found.ConsistencyLevel.IllegalStateException - if the required annotation was not found.public String getRequiredAnnotatedQuery()
Query annotation or throws IllegalStateException if
neither the annotation found nor the attribute was specified.IllegalStateException - in case query method has no annotated query.protected Class<?> getDomainClass()
getDomainClass in class QueryMethodpublic TypeInformation<?> getReturnType()
QueryMethod.public boolean isResultSetQuery()
ResultSet.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.