Package org.springframework.data.solr.repository.query

Examples of org.springframework.data.solr.repository.query.SolrQueryMethod


  private class SolrQueryLookupStrategy implements QueryLookupStrategy {

    @Override
    public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, NamedQueries namedQueries) {

      SolrQueryMethod queryMethod = new SolrQueryMethod(method, metadata, entityInformationCreator);
      String namedQueryName = queryMethod.getNamedQueryName();

      SolrOperations solrOperations = selectSolrOperations(metadata);

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

TOP

Related Classes of org.springframework.data.solr.repository.query.SolrQueryMethod

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.