You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2026/09/06 21:50:48 UTC

(cayenne) branch master updated: Removing unused private CachedSnapshotQuery

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new a42075713 Removing unused private CachedSnapshotQuery
a42075713 is described below

commit a42075713d5b5cee490443a47e40ec00a74fba86
Author: Andrus Adamchik <an...@objectstyle.com>
AuthorDate: Sun Sep 6 17:50:31 2026 -0400

    Removing unused private CachedSnapshotQuery
---
 .../main/java/org/apache/cayenne/access/ObjectStore.java | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/cayenne/src/main/java/org/apache/cayenne/access/ObjectStore.java b/cayenne/src/main/java/org/apache/cayenne/access/ObjectStore.java
index a9e57b84c..08ef52f99 100644
--- a/cayenne/src/main/java/org/apache/cayenne/access/ObjectStore.java
+++ b/cayenne/src/main/java/org/apache/cayenne/access/ObjectStore.java
@@ -449,7 +449,7 @@ public class ObjectStore implements Serializable, SnapshotEventListener, GraphMa
     public DataRow getCachedSnapshot(ObjectId oid) {
 
         if (context != null && context.getParent() != null) {
-            ObjectIdQuery query = new CachedSnapshotQuery(oid);
+            ObjectIdQuery query = new ObjectIdQuery(oid, true, ObjectIdQuery.CACHE_NOREFRESH);
             List<?> results = context.getParent().onQuery(context, query).firstList();
             return results.isEmpty() ? null : (DataRow) results.get(0);
         }
@@ -1001,20 +1001,6 @@ public class ObjectStore implements Serializable, SnapshotEventListener, GraphMa
         }
     }
 
-    // an ObjectIdQuery optimized for retrieval of multiple snapshots - it can be reset
-    // with the new id
-    static final class CachedSnapshotQuery extends ObjectIdQuery {
-
-        CachedSnapshotQuery(ObjectId oid) {
-            super(oid, true, ObjectIdQuery.CACHE_NOREFRESH);
-        }
-
-        void resetId(ObjectId oid) {
-            this.objectId = oid;
-            this.replacementQuery = null;
-        }
-    }
-
     static class SnapshotEventDecorator implements GraphDiff {
 
         SnapshotEvent event;