cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r464045 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
Date Sat, 14 Oct 2006 22:13:39 GMT
Author: aadamchik
Date: Sat Oct 14 15:13:37 2006
New Revision: 464045

URL: http://svn.apache.org/viewvc?view=rev&rev=464045
Log:
CAY-686: Weed out DataObject references from the access stack classes, replacing them with
Persistent and ClassDescriptor
(removing DataObject dependency from DataContext.prepareForAccess)

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

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java?view=diff&rev=464045&r1=464044&r2=464045
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
Sat Oct 14 15:13:37 2006
@@ -856,7 +856,8 @@
                 property.injectValueHolder(persistent);
 
                 if (!property.isFault(persistent)) {
-                    Iterator it = ((Collection) property.readProperty(persistent)).iterator();
+                    Iterator it = ((Collection) property.readProperty(persistent))
+                            .iterator();
                     while (it.hasNext()) {
                         Object target = it.next();
 
@@ -1598,12 +1599,7 @@
 
         if (object.getPersistenceState() == PersistenceState.HOLLOW) {
 
-            if (!(object instanceof DataObject)) {
-                throw new CayenneRuntimeException("Can only resolve DataObjects. Got: "
-                        + object);
-            }
-
-            getObjectStore().resolveHollow((DataObject) object);
+            getObjectStore().resolveHollow(object);
             if (object.getPersistenceState() != PersistenceState.COMMITTED) {
 
                 String state = PersistenceState.persistenceStateName(object



Mime
View raw message