public class CassandraQueryMethod
extends org.springframework.data.repository.query.QueryMethod
QueryMethod.| Constructor and Description |
|---|
CassandraQueryMethod(Method method,
org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata,
org.springframework.data.projection.ProjectionFactory projectionFactory,
org.springframework.data.mapping.context.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.oss.driver.api.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. |
org.springframework.data.util.TypeInformation<?> |
getReturnType() |
boolean |
hasAnnotatedQuery()
Returns whether the method has an annotated query.
|
boolean |
hasConsistencyLevel() |
boolean |
isResultSetQuery() |
void |
verify(Method method,
org.springframework.data.repository.core.RepositoryMetadata metadata)
Validates that this query is not a page query.
|
public CassandraQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.mapping.context.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, org.springframework.data.repository.core.RepositoryMetadata metadata)
public CassandraEntityMetadata<?> getEntityInformation()
getEntityInformation in class org.springframework.data.repository.query.QueryMethodpublic CassandraParameters getParameters()
getParameters in class org.springframework.data.repository.query.QueryMethodprotected CassandraParameters createParameters(Method method)
createParameters in class org.springframework.data.repository.query.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.oss.driver.api.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 org.springframework.data.repository.query.QueryMethodpublic org.springframework.data.util.TypeInformation<?> getReturnType()
QueryMethod.public boolean isResultSetQuery()
ResultSet.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.