From 06cc7b2e41ec7c1b952d0db4bc54ca2d49d446dd Mon Sep 17 00:00:00 2001 From: Adrian Crum Date: Fri, 3 May 2013 01:02:56 +0000 Subject: [PATCH] Remove Javolution from ModelViewEntity. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1478620 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/entity/model/ModelViewEntity.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java b/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java index fffe5a8fec..6468f0d381 100644 --- a/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java +++ b/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java @@ -28,10 +28,9 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.HashMap; import java.util.Set; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilFormatOut; @@ -56,7 +55,7 @@ import org.w3c.dom.NodeList; public class ModelViewEntity extends ModelEntity { public static final String module = ModelViewEntity.class.getName(); - public static Map functionPrefixMap = FastMap.newInstance(); + public static Map functionPrefixMap = new HashMap(); static { functionPrefixMap.put("min", "MIN("); functionPrefixMap.put("max", "MAX("); @@ -69,13 +68,13 @@ public class ModelViewEntity extends ModelEntity { } /** Contains member-entity alias name definitions: key is alias, value is ModelMemberEntity */ - protected Map memberModelMemberEntities = FastMap.newInstance(); + protected Map memberModelMemberEntities = new HashMap(); /** A list of all ModelMemberEntity entries; this is mainly used to preserve the original order of member entities from the XML file */ protected List allModelMemberEntities = new LinkedList(); /** Contains member-entity ModelEntities: key is alias, value is ModelEntity; populated with fields */ - protected Map memberModelEntities = FastMap.newInstance(); + protected Map memberModelEntities = new HashMap(); /** List of alias-alls which act as a shortcut for easily pulling over member entity fields */ protected List aliasAlls = new LinkedList(); @@ -92,7 +91,7 @@ public class ModelViewEntity extends ModelEntity { /** List of field names to group by */ protected List groupByFields = new LinkedList(); - protected Map conversions = FastMap.newInstance(); + protected Map conversions = new HashMap(); protected ViewEntityCondition viewEntityCondition = null; @@ -530,7 +529,7 @@ public class ModelViewEntity extends ModelEntity { } public void populateReverseLinks() { - Map> containedModelFields = FastMap.newInstance(); + Map> containedModelFields = new HashMap>(); Iterator it = getAliasesIterator(); while (it.hasNext()) { ModelViewEntity.ModelAlias alias = it.next(); @@ -1180,7 +1179,7 @@ public class ModelViewEntity extends ModelEntity { public final class ModelConversion implements Serializable { protected final String aliasName; protected final ModelEntity fromModelEntity; - protected final Map fieldMap = FastMap.newInstance(); + protected final Map fieldMap = new HashMap(); protected final Set wildcards = new HashSet(); public ModelConversion(String aliasName, ModelEntity fromModelEntity) { @@ -1217,7 +1216,7 @@ public class ModelViewEntity extends ModelEntity { } public void convert(List> values, Map value) { - Map newValue = FastMap.newInstance(); + Map newValue = new HashMap(); for (Map.Entry entry: fieldMap.entrySet()) { newValue.put(entry.getValue(), value.get(entry.getKey())); } @@ -1385,7 +1384,7 @@ public class ModelViewEntity extends ModelEntity { if (!((this.operator == EntityOperator.IN || this.operator == EntityOperator.BETWEEN) && value instanceof Collection)) { // now to a type conversion for the target fieldName - value = this.viewEntityCondition.modelViewEntity.convertFieldValue(lhsField, value, modelFieldTypeReader, FastMap.newInstance()); + value = this.viewEntityCondition.modelViewEntity.convertFieldValue(lhsField, value, modelFieldTypeReader, new HashMap()); } if (Debug.verboseOn()) Debug.logVerbose("[" + this.viewEntityCondition.modelViewEntity.getEntityName() + "]: Got value for fieldName [" + fieldName + "]: " + value, module);