db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r472134 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java
Date Tue, 07 Nov 2006 15:16:00 GMT
Author: arminw
Date: Tue Nov  7 07:15:59 2006
New Revision: 472134

URL: http://svn.apache.org/viewvc?view=rev&rev=472134
Log:
minor improvements

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java?view=diff&rev=472134&r1=472133&r2=472134
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/MtoNBroker.java Tue
Nov  7 07:15:59 2006
@@ -29,6 +29,7 @@
 import org.apache.ojb.broker.OJBRuntimeException;
 import org.apache.ojb.broker.PersistenceBrokerException;
 import org.apache.ojb.broker.PersistenceBrokerSQLException;
+import org.apache.ojb.broker.core.proxy.IndirectionHandler;
 import org.apache.ojb.broker.accesslayer.ResultSetAndStatement;
 import org.apache.ojb.broker.metadata.ClassDescriptor;
 import org.apache.ojb.broker.metadata.CollectionDescriptor;
@@ -38,6 +39,7 @@
 import org.apache.ojb.broker.query.Query;
 import org.apache.ojb.broker.util.logging.Logger;
 import org.apache.ojb.broker.util.logging.LoggerFactory;
+import org.apache.ojb.broker.util.BrokerHelper;
 
 /**
  * Manage all stuff related to non-decomposed M:N association.
@@ -213,20 +215,21 @@
         }
         List workList = new ArrayList(mnKeys);
         MtoNBroker.Key relatedObjKeys;
-        ClassDescriptor relatedCld = pb.getDescriptorRepository().getDescriptorFor(cod.getItemClass());
-        Object relatedObj;
+        ClassDescriptor relatedCld = pb.getClassDescriptor(cod.getItemClass());
 
+        BrokerHelper helper = pb.serviceBrokerHelper();
+        Object relatedObj;
         // remove keys of relatedObject from the existing m:n rows in workList
         while(collectionIterator.hasNext())
         {
             relatedObj = collectionIterator.next();
-            relatedObjKeys = new MtoNBroker.Key(pb.serviceBrokerHelper().getKeyValues(relatedCld,
relatedObj, true));
+            relatedObjKeys = new MtoNBroker.Key(helper.getKeyValues(relatedCld, relatedObj,
true));
             workList.remove(relatedObjKeys);
         }
 
         // delete all remaining keys in workList
         ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass());
-        ValueContainer[] pkValues = pb.serviceBrokerHelper().getKeyValues(cld, obj);
+        ValueContainer[] pkValues = helper.getKeyValues(cld, obj);
 
         String[] pkColumns = cod.getFksToThisClass();
         String[] fkColumns = cod.getFksToItemClass();



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message