deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [2/3] deltaspike git commit: DELTASPIKE-1163 [perf] avoid duplicate RepositoryComponent lookup
Date Thu, 02 Jun 2016 21:47:40 GMT
DELTASPIKE-1163 [perf] avoid duplicate RepositoryComponent lookup

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/d94bce73
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/d94bce73
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/d94bce73

Branch: refs/heads/master
Commit: d94bce73f86308a9891c0b17b6693fe73713d7ff
Parents: f383fd0
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Thu Jun 2 23:24:06 2016 +0200
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Thu Jun 2 23:24:06 2016 +0200

----------------------------------------------------------------------
 .../org/apache/deltaspike/data/impl/handler/QueryHandler.java   | 2 +-
 .../apache/deltaspike/data/impl/meta/RepositoryComponents.java  | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/d94bce73/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
index e14bc57..b29613f 100755
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
@@ -138,7 +138,7 @@ public class QueryHandler implements Serializable, InvocationHandler
         {
             List<Class<?>> candidates = ProxyUtils.getProxyAndBaseTypes(proxy.getClass());
             RepositoryComponent repo = components.lookupComponent(candidates);
-            RepositoryMethod repoMethod = components.lookupMethod(repo.getRepositoryClass(),
method);
+            RepositoryMethod repoMethod = components.lookupMethod(repo, method);
 
             entityManagerRef = entityManagerRefLookup.lookupReference(repo);
             queryContext = createContext(proxy, method, args, entityManagerRef.getEntityManager(),
repoMethod);

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/d94bce73/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
index e0fba0f..8eec5dd 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
@@ -98,6 +98,11 @@ public class RepositoryComponents
     {
         return lookupComponent(repoClass).lookupMethod(method);
     }
+    
+    public RepositoryMethod lookupMethod(RepositoryComponent component, Method method)
+    {
+        return component.lookupMethod(method);
+    }
 
     private RepositoryEntity extractEntityMetaData(Class<?> repoClass)
     {


Mime
View raw message