deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [2/2] deltaspike git commit: DELTASPIKE-1070 cosmetics
Date Sun, 04 Jun 2017 09:10:09 GMT
DELTASPIKE-1070 cosmetics

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

Branch: refs/heads/master
Commit: 3e39a2c4c4701f18cffc0d311bd972a79640463f
Parents: 96c6ba2
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Sun Jun 4 11:08:23 2017 +0200
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Sun Jun 4 11:08:23 2017 +0200

----------------------------------------------------------------------
 .../data/impl/handler/QueryHandler.java         |  3 +-
 .../impl/meta/RepositoryMetadataHandler.java    | 39 +++++++++-----------
 2 files changed, 19 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/3e39a2c4/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 455bffd..4698541 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
@@ -135,7 +135,8 @@ public class QueryHandler implements Serializable, InvocationHandler
         try
         {
             List<Class<?>> candidates = ProxyUtils.getProxyAndBaseTypes(proxy.getClass());
-            RepositoryMetadata repositoryMetadata = metadataHandler.lookupComponent(candidates);
+            RepositoryMetadata repositoryMetadata =
+                    metadataHandler.lookupComponent(candidates);
             RepositoryMethodMetadata repositoryMethodMetadata =
                     metadataHandler.lookupMethod(repositoryMetadata, method);
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/3e39a2c4/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryMetadataHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryMetadataHandler.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryMetadataHandler.java
index fbbe8e5..3fd2a76 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryMetadataHandler.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryMetadataHandler.java
@@ -53,12 +53,12 @@ public class RepositoryMetadataHandler
     }
 
     /**
-     * Repository access - lookup the Repository component meta data from a list of candidate
classes.
+     * Lookup the Repository component meta data from a list of candidate classes.
      * Depending on the implementation, proxy objects might have been modified so the actual
class
      * does not match the original Repository class.
      *
-     * @param candidateClasses  List of candidates to check.
-     * @return A {@link RepositoryMetadataInitializer} corresponding to the repoClass parameter.
+     * @param candidateClasses List of candidates to check.
+     * @return A {@link RepositoryMetadataInitializer}.
      */
     public RepositoryMetadata lookupComponent(List<Class<?>> candidateClasses)
     {
@@ -73,35 +73,30 @@ public class RepositoryMetadataHandler
     }
 
     /**
-     * Repository access - lookup the Repository component meta data for a specific Repository
class.
+     * Lookup the {@link RepositoryMetadata} for a specific Repository class.
      *
-     * @param repoClass  The Repository class to lookup the method for
-     * @return A {@link RepositoryMetadataInitializer} corresponding to the repoClass parameter.
+     * @param repositoryClass The repository class to lookup the method for
+     * @return A {@link RepositoryMetadata}.
      */
-    public RepositoryMetadata lookupComponent(Class<?> repoClass)
+    public RepositoryMetadata lookupComponent(Class<?> repositoryClass)
     {
-        if (repositoriesMetadata.containsKey(repoClass))
+        if (repositoriesMetadata.containsKey(repositoryClass))
         {
-            return repositoriesMetadata.get(repoClass);
+            return repositoriesMetadata.get(repositoryClass);
         }
-        throw new RuntimeException("Unknown Repository class " + repoClass.getName());
+        throw new RuntimeException("Unknown Repository class " + repositoryClass.getName());
     }
-
+    
     /**
-     * Repository access - lookup method information for a specific Repository class.
+     * lookup the {@link RepositoryMethodMetadata} for a specific repository and method.
      *
-     * @param repoClass The Repository class to lookup the method for
-     * @param method    The Method object to get Repository meta data for.
-     * @return A {@link RepositoryMethodMetadataInitializer} corresponding to the method
parameter.
+     * @param repositoryMetadata The Repository metadata to lookup the method for.
+     * @param method The method object to get Repository meta data for.
+     * @return A {@link RepositoryMethodMetadata}.
      */
-    public RepositoryMethodMetadata lookupMethod(Class<?> repoClass, Method method)
-    {
-        return lookupComponent(repoClass).getMethodsMetadata().get(method);
-    }
-    
-    public RepositoryMethodMetadata lookupMethod(RepositoryMetadata metadata, Method method)
+    public RepositoryMethodMetadata lookupMethod(RepositoryMetadata repositoryMetadata, Method
method)
     {
-        return metadata.getMethodsMetadata().get(method);
+        return repositoryMetadata.getMethodsMetadata().get(method);
     }
 
     public Map<Class<?>, RepositoryMetadata> getRepositories()


Mime
View raw message