cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1501799 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolverNode.java
Date Wed, 10 Jul 2013 15:39:15 GMT
Author: aadamchik
Date: Wed Jul 10 15:39:14 2013
New Revision: 1501799

URL: http://svn.apache.org/r1501799
Log:
CAY-1695  Unexpected null value in bidirectional one-to-one prefetch

formatting, no change

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolverNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolverNode.java?rev=1501799&r1=1501798&r2=1501799&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolverNode.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolverNode.java
Wed Jul 10 15:39:14 2013
@@ -33,8 +33,8 @@ class HierarchicalObjectResolverNode ext
 
     private PrefetchProcessorNode node;
 
-    HierarchicalObjectResolverNode(PrefetchProcessorNode node, DataContext context,
-            ClassDescriptor descriptor, boolean refresh) {
+    HierarchicalObjectResolverNode(PrefetchProcessorNode node, DataContext context, ClassDescriptor
descriptor,
+            boolean refresh) {
         super(context, descriptor, refresh);
         this.node = node;
     }
@@ -50,18 +50,20 @@ class HierarchicalObjectResolverNode ext
 
         // here we can get the same object repeated multiple times in case of
         // many-to-many between prefetched and main entity... this is needed to
-        // connect prefetched objects to the main objects. To avoid needlessly refreshing
-        // the same object multiple times, track which objectids area already loaded in
+        // connect prefetched objects to the main objects. To avoid needlessly
+        // refreshing
+        // the same object multiple times, track which objectids area already
+        // loaded in
         // this pass
         Map<ObjectId, Persistent> seen = new HashMap<ObjectId, Persistent>();
 
         for (DataRow row : rows) {
 
             // determine entity to use
-            ClassDescriptor classDescriptor = descriptorResolutionStrategy
-                    .descriptorForRow(row);
+            ClassDescriptor classDescriptor = descriptorResolutionStrategy.descriptorForRow(row);
 
-            // not using DataRow.createObjectId for performance reasons - ObjectResolver
+            // not using DataRow.createObjectId for performance reasons -
+            // ObjectResolver
             // has all needed metadata already cached.
             ObjectId anId = createObjectId(row, classDescriptor.getEntity(), null);
 
@@ -71,13 +73,13 @@ class HierarchicalObjectResolverNode ext
                 object = objectFromDataRow(row, anId, classDescriptor);
 
                 if (object == null) {
-                    throw new CayenneRuntimeException("Can't build Object from row: "
-                            + row);
+                    throw new CayenneRuntimeException("Can't build Object from row: " + row);
                 }
                 seen.put(anId, object);
             }
 
-            // keep the dupe objects (and data rows) around, as there maybe an attached
+            // keep the dupe objects (and data rows) around, as there maybe an
+            // attached
             // joint prefetch...
             results.add(object);
 
@@ -86,10 +88,14 @@ class HierarchicalObjectResolverNode ext
 
         // now deal with snapshots
 
-        // TODO: refactoring: dupes will clutter the lists and cause extra processing...
-        // removal of dupes happens only downstream, as we need the objects matching
-        // fetched rows for joint prefetch resolving... maybe pushback unique and
-        // non-unique lists to the "node", instead of returning a single list from this
+        // TODO: refactoring: dupes will clutter the lists and cause extra
+        // processing...
+        // removal of dupes happens only downstream, as we need the objects
+        // matching
+        // fetched rows for joint prefetch resolving... maybe pushback unique
+        // and
+        // non-unique lists to the "node", instead of returning a single list
+        // from this
         // method
         cache.snapshotsUpdatedForObjects(results, rows, refreshObjects);
 



Mime
View raw message