Package org.springframework.data.jpa.repository

Examples of org.springframework.data.jpa.repository.QueryHints


    }

    private static final Map<String, Object> findQueryHints(Method method) {

      Map<String, Object> queryHints = new HashMap<String, Object>();
      QueryHints queryHintsAnnotation = AnnotationUtils.findAnnotation(method, QueryHints.class);

      if (queryHintsAnnotation != null) {

        for (QueryHint hint : queryHintsAnnotation.value()) {
          queryHints.put(hint.name(), hint.value());
        }
      }

      QueryHint queryHintAnnotation = AnnotationUtils.findAnnotation(method, QueryHint.class);
View Full Code Here


   */
  List<QueryHint> getHints() {

    List<QueryHint> result = new ArrayList<QueryHint>();

    QueryHints hints = getAnnotation(method, QueryHints.class);
    if (hints != null) {
      result.addAll(Arrays.asList(hints.value()));
    }

    return result;
  }
View Full Code Here

   *
   * @return
   */
  boolean applyHintsToCountQuery() {

    QueryHints hints = getAnnotation(method, QueryHints.class);
    return hints != null ? hints.forCounting() : false;
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.jpa.repository.QueryHints

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.