Examples of JpaEntityGraph


Examples of org.springframework.data.jpa.repository.query.JpaEntityGraph

    }

    private static final JpaEntityGraph findEntityGraph(Method method) {

      EntityGraph entityGraphAnnotation = AnnotationUtils.findAnnotation(method, EntityGraph.class);
      return entityGraphAnnotation == null ? null : new JpaEntityGraph(entityGraphAnnotation.value(),
          entityGraphAnnotation.type());
    }
View Full Code Here

Examples of org.springframework.data.jpa.repository.query.JpaEntityGraph

    for (Entry<String, Object> hint : metadata.getQueryHints().entrySet()) {
      query.setHint(hint.getKey(), hint.getValue());
    }

    JpaEntityGraph jpaEntityGraph = metadata.getEntityGraph();

    if (jpaEntityGraph == null) {
      return query;
    }

    EntityGraph<?> entityGraph = Jpa21Utils.tryGetFetchGraph(em, jpaEntityGraph);

    if (entityGraph == null) {
      return query;
    }

    query.setHint(jpaEntityGraph.getType().getKey(), entityGraph);

    return query;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.