Class CassandraQueryMethod

java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.cassandra.repository.query.CassandraQueryMethod
Direct Known Subclasses:
ReactiveCassandraQueryMethod

public class CassandraQueryMethod extends QueryMethod
Cassandra specific implementation of QueryMethod.
Author:
Matthew Adams, Oliver Gierke, Mark Paluch, John Blum
  • Constructor Details

  • Method Details

    • verify

      public void verify(Method method, RepositoryMetadata metadata)
      Validates that this query is not a page query.
    • getEntityInformation

      public CassandraEntityMetadata<?> getEntityInformation()
      Overrides:
      getEntityInformation in class QueryMethod
    • getParameters

      public CassandraParameters getParameters()
      Overrides:
      getParameters in class QueryMethod
    • createParameters

      protected Parameters<?,?> createParameters(ParametersSource parametersSource)
      Overrides:
      createParameters in class QueryMethod
    • hasAnnotatedQuery

      public boolean hasAnnotatedQuery()
      Returns whether the method has an annotated query.
    • getAnnotatedQuery

      @Nullable public String getAnnotatedQuery()
      Returns the query string declared in a Query annotation or null if neither the annotation found nor the attribute was specified.
      Returns:
      the query string or null if no query string present.
    • hasConsistencyLevel

      public boolean hasConsistencyLevel()
      Returns:
      whether the method has an annotated ConsistencyLevel.
      Since:
      2.0
    • getRequiredAnnotatedConsistencyLevel

      public com.datastax.oss.driver.api.core.ConsistencyLevel getRequiredAnnotatedConsistencyLevel() throws IllegalStateException
      Returns the ConsistencyLevel in a Query annotation or throws IllegalStateException if the annotation was not found.
      Returns:
      the ConsistencyLevel.
      Throws:
      IllegalStateException - if the required annotation was not found.
    • getRequiredAnnotatedQuery

      public 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.
      Returns:
      the query string.
      Throws:
      IllegalStateException - in case query method has no annotated query.
    • getDomainClass

      protected Class<?> getDomainClass()
      Overrides:
      getDomainClass in class QueryMethod
    • getReturnType

      public TypeInformation<?> getReturnType()
      Returns:
      the return type for this QueryMethod.
    • isResultSetQuery

      public boolean isResultSetQuery()
      Returns:
      true if the method returns a ResultSet.