cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r431971 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java
Date Wed, 16 Aug 2006 18:18:00 GMT
Author: aadamchik
Date: Wed Aug 16 11:18:00 2006
New Revision: 431971

URL: http://svn.apache.org/viewvc?rev=431971&view=rev
Log:
code cleanup - downcasting DataObject to persistent whenever possible; removing noop methods.

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java?rev=431971&r1=431970&r2=431971&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4-core/src/main/java/org/apache/cayenne/access/ObjectStore.java
Wed Aug 16 11:18:00 2006
@@ -305,7 +305,7 @@
         Collection ids = new ArrayList(objects.size());
         Iterator it = objects.iterator();
         while (it.hasNext()) {
-            DataObject object = (DataObject) it.next();
+            Persistent object = (Persistent) it.next();
 
             // we don't care about NEW objects,
             // but we still do care about HOLLOW, since snapshot might still be
@@ -354,7 +354,7 @@
 
         Iterator it = objects.iterator();
         while (it.hasNext()) {
-            DataObject object = (DataObject) it.next();
+            Persistent object = (Persistent) it.next();
 
             ObjectId id = object.getObjectId();
 
@@ -363,7 +363,7 @@
             changes.remove(id);
             ids.add(id);
 
-            object.setDataContext(null);
+            object.setObjectContext(null);
             object.setObjectId(null);
             object.setPersistenceState(PersistenceState.TRANSIENT);
         }
@@ -392,13 +392,13 @@
 
         // collect candidates
         while (it.hasNext()) {
-            DataObject object = (DataObject) it.next();
+            Persistent object = (Persistent) it.next();
             int objectState = object.getPersistenceState();
             switch (objectState) {
                 case PersistenceState.NEW:
                     it.remove();
 
-                    object.setDataContext(null);
+                    object.setObjectContext(null);
                     object.setObjectId(null);
                     object.setPersistenceState(PersistenceState.TRANSIENT);
                     break;
@@ -498,7 +498,7 @@
         while (entries.hasNext()) {
             Map.Entry entry = (Map.Entry) entries.next();
 
-            DataObject object = (DataObject) entry.getValue();
+            Persistent object = (Persistent) entry.getValue();
 
             switch (object.getPersistenceState()) {
                 case PersistenceState.DELETED:
@@ -1049,38 +1049,6 @@
         }
 
         return object;
-    }
-
-    /**
-     * Does nothing.
-     * 
-     * @since 1.2
-     */
-    public void graphCommitAborted() {
-    }
-
-    /**
-     * Does nothing.
-     * 
-     * @since 1.2
-     */
-    public void graphCommitStarted() {
-    }
-
-    /**
-     * Does nothing.
-     * 
-     * @since 1.2
-     */
-    public void graphCommitted() {
-    }
-
-    /**
-     * Does nothing.
-     * 
-     * @since 1.2
-     */
-    public void graphRolledback() {
     }
 
     /**



Mime
View raw message