cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [20/30] cayenne git commit: CAY-2377. Cleanup deprecated code
Date Thu, 07 Dec 2017 10:09:49 GMT
CAY-2377. Cleanup deprecated code


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

Branch: refs/heads/master
Commit: f98da6900c062c09cea800bc1d3b5cf22db05cb0
Parents: 4cd3d7a
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Mon Nov 13 09:04:57 2017 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Wed Nov 15 10:27:48 2017 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/cayenne/query/AbstractQuery.java    | 2 +-
 .../main/java/org/apache/cayenne/query/BaseQueryMetadata.java    | 4 +---
 .../main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java   | 2 +-
 .../java/org/apache/cayenne/query/ProcedureQueryMetadata.java    | 2 +-
 .../main/java/org/apache/cayenne/query/SQLTemplateMetadata.java  | 2 +-
 .../main/java/org/apache/cayenne/query/SelectQueryMetadata.java  | 2 +-
 docs/doc/src/main/resources/UPGRADE.txt                          | 4 ++++
 7 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/AbstractQuery.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/AbstractQuery.java b/cayenne-server/src/main/java/org/apache/cayenne/query/AbstractQuery.java
index 7e2dcae..246daea 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/AbstractQuery.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/AbstractQuery.java
@@ -56,7 +56,7 @@ public abstract class AbstractQuery extends CacheableQuery {
      */
     public QueryMetadata getMetaData(EntityResolver resolver) {
         BaseQueryMetadata md = new BaseQueryMetadata();
-        md.resolve(getRoot(), resolver, null);
+        md.resolve(getRoot(), resolver);
         return md;
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
b/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
index e8d8ce9..e1cd167 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
@@ -91,12 +91,10 @@ class BaseQueryMetadata implements QueryMetadata, Serializable {
 		setPrefetchTree(info.getPrefetchTree());
 	}
 
-	boolean resolve(Object root, EntityResolver resolver, String cacheKey) {
+	boolean resolve(Object root, EntityResolver resolver) {
 
 		if (lastRoot != root || lastEntityResolver != resolver) {
 
-			this.cacheKey = cacheKey;
-
 			this.classDescriptor = null;
 			this.dbEntity = null;
 			this.dataMap = null;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java
b/cayenne-server/src/main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java
index 620f8e7..79c22fa 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/EJBQLQueryMetadata.java
@@ -43,7 +43,7 @@ class EJBQLQueryMetadata extends BaseQueryMetadata {
 
         ObjEntity root = expression.getRootDescriptor().getEntity();
 
-        if (!super.resolve(root, resolver, null)) {
+        if (!super.resolve(root, resolver)) {
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/ProcedureQueryMetadata.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/ProcedureQueryMetadata.java
b/cayenne-server/src/main/java/org/apache/cayenne/query/ProcedureQueryMetadata.java
index 7a2e35a..4e70ba9 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/ProcedureQueryMetadata.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/ProcedureQueryMetadata.java
@@ -47,7 +47,7 @@ class ProcedureQueryMetadata extends BaseQueryMetadata {
             Object resultRoot,
             EntityResolver resolver,
             ProcedureQuery query) {
-        if (super.resolve(resultRoot, resolver, null)) {
+        if (super.resolve(resultRoot, resolver)) {
             procedure = null;
 
             if (root != null) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
b/cayenne-server/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
index 236c0c7..96d329a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/SQLTemplateMetadata.java
@@ -33,7 +33,7 @@ class SQLTemplateMetadata extends BaseQueryMetadata {
 
 	boolean resolve(Object root, EntityResolver resolver, SQLTemplate query) {
 
-		if (super.resolve(root, resolver, null)) {
+		if (super.resolve(root, resolver)) {
 
 			resultSetMapping = query.getResult() != null ? query.getResult().getResolvedComponents(resolver)
: null;
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
b/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
index 37a0301..66c947d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
@@ -75,7 +75,7 @@ class SelectQueryMetadata extends BaseQueryMetadata {
 
 	boolean resolve(Object root, EntityResolver resolver, SelectQuery<?> query) {
 
-		if (super.resolve(root, resolver, null)) {
+		if (super.resolve(root, resolver)) {
 			// generate unique cache key, but only if we are caching..
 			if (cacheStrategy != null && cacheStrategy != QueryCacheStrategy.NO_CACHE) {
 				this.cacheKey = makeCacheKey(query, resolver);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f98da690/docs/doc/src/main/resources/UPGRADE.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt
index 199a9c2..e7fcec5 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -262,6 +262,10 @@ UPGRADING TO 4.1.M2
       - removed setName(String name) in org.apache.cayenne.query.SelectQueryCacheKeyIT, org.apache.cayenne.query.SQLTemplateCacheKeyIT,
org.apache.cayenne.query.ProcedureQueryCacheKeyIT,
       org.apache.cayenne.query.SQLTemplate_LegacyTest, org.apache.cayenne.query.MockAbstractQuery;
 
+      - removed String cacheKey from boolean resolve(Object root, EntityResolver resolver)
arguments;
+
+
+
 UPGRADING TO 4.1.M1
 
 * Per CAY-2351 Minimum supported Java version is now Java 8. There is no options to use Cayenne
4.1 with earlier


Mime
View raw message