cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r449422 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ClientServerChannel.java
Date Sun, 24 Sep 2006 16:09:34 GMT
Author: aadamchik
Date: Sun Sep 24 09:09:33 2006
New Revision: 449422

URL: http://svn.apache.org/viewvc?view=rev&rev=449422
Log:
CAY-666 - streamlining ClientServerChannel, removing lots of unneeded code where it was second-guessing
DataContext

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

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ClientServerChannel.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ClientServerChannel.java?view=diff&rev=449422&r1=449421&r2=449422
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ClientServerChannel.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ClientServerChannel.java
Sun Sep 24 09:09:33 2006
@@ -19,7 +19,6 @@
 
 package org.apache.cayenne.access;
 
-import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.DataChannel;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.QueryResponse;
@@ -101,37 +100,7 @@
             GraphDiff changes,
             int syncType) {
 
-        // sync client changes
-        switch (syncType) {
-            case DataChannel.ROLLBACK_CASCADE_SYNC:
-                return onRollback(changes);
-            case DataChannel.FLUSH_NOCASCADE_SYNC:
-                return onFlush(changes);
-            case DataChannel.FLUSH_CASCADE_SYNC:
-                return onCommit(changes);
-            default:
-                throw new CayenneRuntimeException("Unrecognized SyncMessage type: "
-                        + syncType);
-        }
-    }
-
-    GraphDiff onRollback(GraphDiff childDiff) {
-        serverContext.rollbackChanges();
-        return null;
-    }
-
-    /**
-     * Applies child diff, without returning anything back.
-     */
-    GraphDiff onFlush(GraphDiff childDiff) {
-        return serverContext.onSync(null, childDiff, DataChannel.FLUSH_NOCASCADE_SYNC);
-    }
-
-    /**
-     * Applies child diff, and then commits.
-     */
-    GraphDiff onCommit(GraphDiff childDiff) {
-        return serverContext.onContextFlush(null, childDiff, true);
+        return serverContext.onSync(null, changes, syncType);
     }
 
     /**



Mime
View raw message