You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/12/23 00:17:57 UTC

svn commit: r893345 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Author: doogie
Date: Tue Dec 22 23:17:56 2009
New Revision: 893345

URL: http://svn.apache.org/viewvc?rev=893345&view=rev
Log:
Pass the list of values to ModelConversion.convert().

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=893345&r1=893344&r2=893345&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Tue Dec 22 23:17:56 2009
@@ -600,7 +600,7 @@
         if (conversions == null) return null;
         List<Map<String, Object>> values = FastList.newInstance();
         for (ModelConversion conversion: conversions.values()) {
-            values.add(conversion.convert(data));
+            conversion.convert(values, data);
         }
         return values;
     }
@@ -1118,7 +1118,7 @@
             return aliasName + "(" + fromModelEntity.getEntityName() + ")";
         }
 
-        public Map<String, Object> convert(Map<String, ? extends Object> value) {
+        public void convert(List<Map<String, Object>> values, Map<String, ? extends Object> value) {
             Map<String, Object> newValue = FastMap.newInstance();
             for (Map.Entry<String, String> entry: fieldMap.entrySet()) {
                 newValue.put(entry.getValue(), value.get(entry.getKey()));
@@ -1126,7 +1126,7 @@
             for (String key: wildcards) {
                 newValue.put(key, EntityOperator.WILDCARD);
             }
-            return newValue;
+            values.add(newValue);
         }
 
         public void addAllAliasConversions(String fieldName, String... aliases) {