org.springframework.data.document.mongodb.repository
Class MongoQueryMethod

java.lang.Object
  extended by QueryMethod
      extended by org.springframework.data.document.mongodb.repository.MongoQueryMethod

 class MongoQueryMethod
extends QueryMethod

TODO - Extract methods for getAnnotatedQuery() into superclass as it is currently copied from Spring Data JPA

Author:
Oliver Gierke

Field Summary
private  MongoEntityInformation<?,?> entityInformation
           
private  java.lang.reflect.Method method
           
 
Constructor Summary
MongoQueryMethod(java.lang.reflect.Method method, RepositoryMetadata metadata, MongoRepositoryFactoryBean.EntityInformationCreator entityInformationCreator)
          Creates a new MongoQueryMethod from the given Method.
 
Method Summary
(package private)  java.lang.String getAnnotatedQuery()
          Returns the query string declared in a Query annotation or null if neither the annotation found nor the attribute was specified.
 MongoEntityInformation<?,?> getEntityInformation()
           
(package private)  java.lang.String getFieldSpecification()
          Returns the field specification to be used for the query.
private  Query getQueryAnnotation()
          Returns the Query annotation that is applied to the method or null if none available.
(package private)  boolean hasAnnotatedQuery()
          Returns whether the method has an annotated query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

private final java.lang.reflect.Method method

entityInformation

private final MongoEntityInformation<?,?> entityInformation
Constructor Detail

MongoQueryMethod

public MongoQueryMethod(java.lang.reflect.Method method,
                        RepositoryMetadata metadata,
                        MongoRepositoryFactoryBean.EntityInformationCreator entityInformationCreator)
Creates a new MongoQueryMethod from the given Method.

Parameters:
method -
Method Detail

hasAnnotatedQuery

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

Returns:

getAnnotatedQuery

java.lang.String getAnnotatedQuery()
Returns the query string declared in a Query annotation or null if neither the annotation found nor the attribute was specified.

Returns:

getFieldSpecification

java.lang.String getFieldSpecification()
Returns the field specification to be used for the query.

Returns:

getEntityInformation

public MongoEntityInformation<?,?> getEntityInformation()

getQueryAnnotation

private Query getQueryAnnotation()
Returns the Query annotation that is applied to the method or null if none available.

Returns: