cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r632582 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: CayenneContextGraphAction.java access/DataContextGraphAction.java util/ObjectContextGraphAction.java
Date Sat, 01 Mar 2008 11:51:08 GMT
Author: aadamchik
Date: Sat Mar  1 03:51:07 2008
New Revision: 632582

URL: http://svn.apache.org/viewvc?rev=632582&view=rev
Log:
CAY-789 return object diff to client in ROP after commit
(refactoring of property change handler for DataContext to match that of CayenneContext, and
more importantly, pass all events to the GraphManager/ObjectStore)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextGraphAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ObjectContextGraphAction.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java?rev=632582&r1=632581&r2=632582&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
Sat Mar  1 03:51:07 2008
@@ -36,6 +36,7 @@
 class CayenneContextGraphAction extends ObjectContextGraphAction {
 
     static final ThreadLocal<Boolean> arcChangeInProcess = new ThreadLocal<Boolean>()
{
+
         @Override
         protected synchronized Boolean initialValue() {
             return Boolean.FALSE;
@@ -84,20 +85,6 @@
         finally {
             setArcChangeInProcess(false);
         }
-    }
-
-    @Override
-    protected void handleSimplePropertyChange(
-            Persistent object,
-            String propertyName,
-            Object oldValue,
-            Object newValue) {
-        context.getGraphManager().nodePropertyChanged(
-                object.getObjectId(),
-                propertyName,
-                oldValue,
-                newValue);
-        markAsDirty(object);
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextGraphAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextGraphAction.java?rev=632582&r1=632581&r2=632582&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextGraphAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextGraphAction.java
Sat Mar  1 03:51:07 2008
@@ -38,24 +38,6 @@
     }
 
     @Override
-    protected void handleSimplePropertyChange(
-            Persistent object,
-            String propertyName,
-            Object oldValue,
-            Object newValue) {
-
-        // for simple properties ObjectStore requires a callback only the first time the
-        // object changes
-        if (markAsDirty(object)) {
-            context.getGraphManager().nodePropertyChanged(
-                    object.getObjectId(),
-                    propertyName,
-                    oldValue,
-                    newValue);
-        }
-    }
-
-    @Override
     protected void handleArcPropertyChange(
             Persistent object,
             ArcProperty property,

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ObjectContextGraphAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ObjectContextGraphAction.java?rev=632582&r1=632581&r2=632582&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ObjectContextGraphAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ObjectContextGraphAction.java
Sat Mar  1 03:51:07 2008
@@ -75,11 +75,19 @@
             Object oldValue,
             Object newValue);
 
-    protected abstract void handleSimplePropertyChange(
+    protected void handleSimplePropertyChange(
             Persistent object,
             String propertyName,
             Object oldValue,
-            Object newValue);
+            Object newValue) {
+        
+        context.getGraphManager().nodePropertyChanged(
+                object.getObjectId(),
+                propertyName,
+                oldValue,
+                newValue);
+        markAsDirty(object);
+    }
 
     /**
      * Changes object state to MODIFIED if needed, returning true if the change has



Mime
View raw message