cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1169617 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: BaseContext.java CayenneContext.java access/DataContext.java
Date Mon, 12 Sep 2011 06:54:52 GMT
Author: aadamchik
Date: Mon Sep 12 06:54:52 2011
New Revision: 1169617

URL: http://svn.apache.org/viewvc?rev=1169617&view=rev
Log:
CAY-1611 ObjectContext API improvement - better 'localObect' method

refactoring away the use of old method

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/BaseContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/BaseContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/BaseContext.java?rev=1169617&r1=1169616&r2=1169617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/BaseContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/BaseContext.java
Mon Sep 12 06:54:52 2011
@@ -226,8 +226,8 @@ public abstract class BaseContext implem
         if (!id.isTemporary()) {
             synchronized (getGraphManager()) {
 
-                // check for race condition - the object appeared in the GraphManager just
-                // recently...
+                // check for race condition - the object may have appeared in the
+                // GraphManager just recently...
                 localObject = (T) getGraphManager().getNode(id);
                 if (localObject != null) {
                     return localObject;
@@ -271,6 +271,11 @@ public abstract class BaseContext implem
 
     public abstract GraphManager getGraphManager();
 
+    /**
+     * @deprecated since 3.1 Cayenne users should use {@link #localObject(Object)}; the
+     *             internal code has been refactored to avoid using this method all
+     *             together.
+     */
     public abstract Persistent localObject(ObjectId id, Object prototype);
 
     public abstract Collection<?> modifiedObjects();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java?rev=1169617&r1=1169616&r2=1169617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
Mon Sep 12 06:54:52 2011
@@ -301,6 +301,10 @@ public class CayenneContext extends Base
      * <i>Current limitation: all objects in the source list must be either in COMMITTED
      * or in HOLLOW state.</i>
      * </p>
+     * 
+     * @deprecated since 3.1 Cayenne users should use {@link #localObject(Object)}; the
+     *             internal code has been refactored to avoid using this method all
+     *             together.
      */
     @Override
     public Persistent localObject(ObjectId id, Object prototype) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=1169617&r1=1169616&r2=1169617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Mon Sep 12 06:54:52 2011
@@ -1165,6 +1165,9 @@ public class DataContext extends BaseCon
      * way for Cayenne to determine the resulting local object state.
      * 
      * @since 1.2
+     * @deprecated since 3.1 Cayenne users should use {@link #localObject(Object)}; the
+     *             internal code has been refactored to avoid using this method all
+     *             together.
      */
     @Override
     public Persistent localObject(ObjectId id, Object prototype) {



Mime
View raw message