cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [14/30] cayenne git commit: CAY-2377. Cleanup deprecated code
Date Thu, 07 Dec 2017 10:09:43 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/ad04fb80
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/ad04fb80
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/ad04fb80

Branch: refs/heads/master
Commit: ad04fb80819446a3476e73aa82d720f51a1f099a
Parents: 98a2d23
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Thu Oct 26 09:51:16 2017 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Wed Nov 15 10:27:47 2017 +0300

----------------------------------------------------------------------
 .../cayenne/lifecycle/id/StringIdQuery.java     |  9 --------
 .../org/apache/cayenne/query/BatchQuery.java    |  7 -------
 .../apache/cayenne/query/CacheableQuery.java    | 17 ---------------
 .../cayenne/query/SelectQueryCacheKeyIT.java    | 22 --------------------
 docs/doc/src/main/resources/UPGRADE.txt         |  7 ++++++-
 5 files changed, 6 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/ad04fb80/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/id/StringIdQuery.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/id/StringIdQuery.java
b/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/id/StringIdQuery.java
index 56c500f..bec2c9c 100644
--- a/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/id/StringIdQuery.java
+++ b/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/id/StringIdQuery.java
@@ -162,11 +162,6 @@ public class StringIdQuery implements Query {
                 return false;
             }
 
-            @Deprecated
-            public Query getOrginatingQuery() {
-                return null;
-            }
-
             public Query getOriginatingQuery() {
                 return null;
             }
@@ -273,8 +268,4 @@ public class StringIdQuery implements Query {
         return dataMap;
     }
 
-    @Deprecated
-    public void setDataMap(DataMap dataMap) {
-        this.dataMap = dataMap;
-    }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/ad04fb80/cayenne-server/src/main/java/org/apache/cayenne/query/BatchQuery.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/BatchQuery.java b/cayenne-server/src/main/java/org/apache/cayenne/query/BatchQuery.java
index de191a7..695224a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/BatchQuery.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/BatchQuery.java
@@ -157,11 +157,4 @@ public abstract class BatchQuery implements Query {
         return dbAttributes;
     }
 
-    /**
-     * @deprecated since 4.0 use getRows().size().
-     */
-    @Deprecated
-    public int size() {
-        return rows.size();
-    }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/ad04fb80/cayenne-server/src/main/java/org/apache/cayenne/query/CacheableQuery.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/CacheableQuery.java b/cayenne-server/src/main/java/org/apache/cayenne/query/CacheableQuery.java
index 0780381..bc3d3a9 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/CacheableQuery.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/CacheableQuery.java
@@ -114,23 +114,6 @@ public abstract class CacheableQuery implements Query {
     }
 
     /**
-     * Instructs Cayenne to look for query results in the "local" cache when
-     * running the query. This is a short-hand notation for:
-     *
-     * <pre>
-     * query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
-     * query.setCacheGroups(&quot;group1&quot;, &quot;group2&quot;);
-     * </pre>
-     * @deprecated since 4.0, use {@link CacheableQuery#useLocalCache(String)}
-     * @since 4.0
-     */
-    @Deprecated
-    public void useLocalCache(String... cacheGroups) {
-        setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
-        setCacheGroups(cacheGroups);
-    }
-
-    /**
      * Instructs Cayenne to look for query results in the "shared" cache when
      * running the query. This is a short-hand notation for:
      *

http://git-wip-us.apache.org/repos/asf/cayenne/blob/ad04fb80/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
index 5b4bc94..cfde82f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
@@ -89,28 +89,6 @@ public class SelectQueryCacheKeyIT extends ServerCase {
     }
 
     @Test
-    public void testUseLocalCacheOld() {
-
-        SelectQuery<Artist> q1 = new SelectQuery<>(Artist.class);
-        q1.useLocalCache();
-
-        QueryMetadata md1 = q1.getMetaData(resolver);
-        assertEquals(QueryCacheStrategy.LOCAL_CACHE, md1.getCacheStrategy());
-        assertNotNull(md1.getCacheKey());
-        assertNull(md1.getCacheGroups());
-        assertNull(md1.getCacheGroup());
-
-        SelectQuery<Artist> q2 = new SelectQuery<>(Artist.class);
-        q2.useLocalCache("g1", "g2");
-
-        QueryMetadata md2 = q2.getMetaData(resolver);
-        assertEquals(QueryCacheStrategy.LOCAL_CACHE, md2.getCacheStrategy());
-        assertNotNull(md2.getCacheKey());
-        assertEquals(1, md2.getCacheGroups().length);
-        assertEquals("g1", md2.getCacheGroup());
-    }
-
-    @Test
     public void testSharedCache() {
 
         SelectQuery<Artist> query = new SelectQuery<>(Artist.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/ad04fb80/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 f1f1558..73a6cce 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -181,7 +181,12 @@ UPGRADING TO 4.1.M2
       - removed Query getOrginatingQuery() {use DefaultQueryMetadata#getOriginatingQuery()}
in org.apache.cayenne.query.DefaultQueryMetadata;
       - removed Query getOrginatingQuery() in org.apache.cayenne.query.MockQueryMetadata;
       - removed Query getOrginatingQuery() {since 4.0, use BaseQueryMetadata#getOriginatingQuery()}
in org.apache.cayenne.query.BaseQueryMetadata;
-      
+      - removed Query getOrginatingQuery() in org.apache.cayenne.lifecycle.StringIdQuery;
+      - removed void setDataMap(DataMap dataMap) on org.apache.cayenne.lifecycle.StringIdQuery;
+      - removed void useLocalCache(String... cacheGroups) {since 4.0, use CacheableQuery#useLocalCache(String)}
in org.apache.cayenne.org.apacche.cayenne.query.CacheableQuery with test
+      void testUseLocalCacheOld() in org.apache.cayenne.query.SelectQueryCacheKeyIT;
+      - removed int size() {since 4.0 use getRows().size()} in org.apache.cayenne.query.BatchQuery;
+
 
 
 UPGRADING TO 4.1.M1


Mime
View raw message