Package org.springframework.data.mongodb.repository.query

Examples of org.springframework.data.mongodb.repository.query.MongoQueryMethod


     * (non-Javadoc)
     * @see org.springframework.data.repository.query.QueryLookupStrategy#resolveQuery(java.lang.reflect.Method, org.springframework.data.repository.core.RepositoryMetadata, org.springframework.data.repository.core.NamedQueries)
     */
    public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, NamedQueries namedQueries) {

      MongoQueryMethod queryMethod = new MongoQueryMethod(method, metadata, mappingContext);
      String namedQueryName = queryMethod.getNamedQueryName();

      if (namedQueries.hasQuery(namedQueryName)) {
        String namedQuery = namedQueries.getQuery(namedQueryName);
        return new StringBasedMongoQuery(namedQuery, queryMethod, mongoOperations);
      } else if (queryMethod.hasAnnotatedQuery()) {
        return new StringBasedMongoQuery(queryMethod, mongoOperations);
      } else {
        return new PartTreeMongoQuery(queryMethod, mongoOperations);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.repository.query.MongoQueryMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.