svn commit: r472139 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java

[email protected]
Newsgroups gmane.comp.jakarta.ojb.devel
Message-ID <[email protected]>
Author: arminw
Date: Tue Nov  7 07:22:17 2006
New Revision: 472139

URL: http://svn.apache.org/viewvc?view=rev&rev=472139
Log:
minor changes, add comment

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java?view=diff&rev=472139&r1=472138&r2=472139
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java Tue Nov  7 07:22:17 2006
@@ -222,20 +222,19 @@
     private FieldDescriptor[] getAllMappedColumns(List classDescriptors)
     {
         /* mkalen: Use an ordered implementation not to loose individual field ordering.
-            This is especially important for eg Oracle9i platform and LONGVARBINARY columns,
-            see http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/basic.htm#1021777
-            "If you do not use the SELECT-list order to access data,
-             then you can lose the stream data."
+        This is especially important for eg Oracle9i platform and LONGVARBINARY columns,
+        see http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/basic.htm#1021777
+        "If you do not use the SELECT-list order to access data,
+        then you can lose the stream data."
         */
         List allFieldDescriptors = new ArrayList();
 
         Set visitedColumns = new HashSet();
-        Iterator it = classDescriptors.iterator();
         ClassDescriptor temp;
         FieldDescriptor[] fields;
-        while (it.hasNext())
+        for (int k = 0; k < classDescriptors.size(); k++)
         {
-            temp = (ClassDescriptor) it.next();
+            temp = (ClassDescriptor) classDescriptors.get(k);
             fields = temp.getFieldDescriptions();
             if (fields != null)
             {
@@ -275,7 +274,11 @@
         */
         Iterator iter = ((HashMap)descriptorTable.clone()).values().iterator();
         List retval = new ArrayList();
-        // make sure that target class is at first position
+        /*
+        make sure that target class is at first position
+        this is mandatory, because only this way we can guarantee to extract
+        the correct field-descriptor in method #getAllMappedColumns
+        */
         retval.add(targetCld);
         while (iter.hasNext())
         {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.