svn commit: r805519 [3/9] - in /ofbiz/branches/executioncontext20090812: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/script/org/ofbiz/accounting/finaccount/ application...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r805519 [3/9] - in /ofbiz/branches/executioncontext20090812: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/script/org/ofbiz/accounting/finaccount/ application...

adrianc
Added: ofbiz/branches/executioncontext20090812/applications/content/dtd/xlink.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/dtd/xlink.xsd?rev=805519&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/dtd/xlink.xsd (added)
+++ ofbiz/branches/executioncontext20090812/applications/content/dtd/xlink.xsd Tue Aug 18 18:10:44 2009
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:docbook="http://docbook.org/ns/docbook">
+  <xs:attribute name="href"/>
+  <xs:attribute name="type"/>
+  <xs:attribute name="role"/>
+  <xs:attribute name="arcrole"/>
+  <xs:attribute name="title"/>
+  <xs:attribute name="show">
+    <xs:simpleType>
+      <xs:restriction base="xs:token">
+        <xs:enumeration value="new"/>
+        <xs:enumeration value="replace"/>
+        <xs:enumeration value="embed"/>
+        <xs:enumeration value="other"/>
+        <xs:enumeration value="none"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+  <xs:attribute name="actuate">
+    <xs:simpleType>
+      <xs:restriction base="xs:token">
+        <xs:enumeration value="onLoad"/>
+        <xs:enumeration value="onRequest"/>
+        <xs:enumeration value="other"/>
+        <xs:enumeration value="none"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+  <xs:attribute name="label" type="xs:NMTOKEN"/>
+  <xs:attribute name="from" type="xs:NMTOKEN"/>
+  <xs:attribute name="to" type="xs:NMTOKEN"/>
+</xs:schema>

Added: ofbiz/branches/executioncontext20090812/applications/content/dtd/xml.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/dtd/xml.xsd?rev=805519&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/dtd/xml.xsd (added)
+++ ofbiz/branches/executioncontext20090812/applications/content/dtd/xml.xsd Tue Aug 18 18:10:44 2009
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:docbook="http://docbook.org/ns/docbook">
+  <xs:attribute name="id" type="xs:ID"/>
+  <xs:attribute name="lang"/>
+  <xs:attribute name="base"/>
+  <xs:attribute name="space">
+    <xs:simpleType>
+      <xs:restriction base="xs:token">
+        <xs:enumeration value="preserve"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+</xs:schema>

Modified: ofbiz/branches/executioncontext20090812/applications/content/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/entitydef/entitymodel.xml?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/content/entitydef/entitymodel.xml Tue Aug 18 18:10:44 2009
@@ -228,9 +228,6 @@
       <relation type="many" rel-entity-name="ContentAssocDataResourceViewTo">
         <key-map field-name="contentId" rel-field-name="contentIdStart"/>
       </relation>
-      <index name="contentName">
-        <index-field name="contentName"/>
-      </index>
     </entity>
     <view-entity entity-name="ContentAndRole" package-name="org.ofbiz.content.content" title="Content And Role View Entity">
         <member-entity entity-alias="CNT" entity-name="Content"/>

Modified: ofbiz/branches/executioncontext20090812/applications/content/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/ofbiz-component.xml?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/ofbiz-component.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/content/ofbiz-component.xml Tue Aug 18 18:10:44 2009
@@ -47,6 +47,7 @@
     <entity-resource type="data" reader-name="demo" loader="main" location="data/WebSitePublishPointData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/CompDocData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/ForumDemoData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/DocBookDemoData.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_content.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_contenttypes.xml"/>

Modified: ofbiz/branches/executioncontext20090812/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/content/src/org/ofbiz/content/content/ContentWorker.java Tue Aug 18 18:10:44 2009
@@ -275,7 +275,7 @@
                     throw new GeneralException(e.getMessage());
                 }
 
-                // using FTL to handle XML? not really sure what this is doing...
+                // This part is using an xml file as the input data and an ftl file to present it.
                 if (UtilValidate.isNotEmpty(mimeType)) {
                     if (mimeType.toLowerCase().indexOf("xml") >= 0) {
                         StringReader sr = new StringReader(textData);

Modified: ofbiz/branches/executioncontext20090812/applications/content/widget/content/ContentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/widget/content/ContentForms.xml?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/widget/content/ContentForms.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/content/widget/content/ContentForms.xml Tue Aug 18 18:10:44 2009
@@ -567,10 +567,7 @@
             <set field="mimeTypeId" from-field="dataResource.mimeTypeId"/>
         </row-actions>
         <field name="contentId">
-            <hyperlink also-hidden="false" description="${content.contentName} [${content.contentId}]" target="ViewSimpleContent">
-                <parameter param-name="contentId" from-field="content.contentId"/>
-                <parameter param-name="dataResourceId" from-field="content.dataResourceId"/>
-            </hyperlink>
+            <hyperlink also-hidden="false" description="${content.contentName} [${content.contentId}]" target="views/ShowDocument?contentId=${content.contentId}"/>
         </field>
         <field name="contentTypeId">
             <display-entity entity-name="ContentType" key-field-name="contentTypeId" description="${description}"/>

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java Tue Aug 18 18:10:44 2009
@@ -33,7 +33,6 @@
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.entity.EntityFactory;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericPK;
 import org.ofbiz.service.GenericServiceException;
@@ -76,7 +75,7 @@
                 request.setAttribute("_ERROR_MESSAGE_", errMsg);
                 return "error";
             }
-            GenericPK key = EntityFactory.createGenericPK(delegator.getModelEntity("WorkEffortGoodStandard"), UtilMisc.toMap("workEffortId", (String)componentRow.get("productionRunTaskId"),
+            GenericPK key = GenericPK.create(delegator.getModelEntity("WorkEffortGoodStandard"), UtilMisc.toMap("workEffortId", (String)componentRow.get("productionRunTaskId"),
                                                                                                                 "productId", (String)componentRow.get("productId"),
                                                                                                                 "fromDate", fromDate,
                                                                                                                 "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"));

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Tue Aug 18 18:10:44 2009
@@ -30,7 +30,6 @@
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilNumber;
 import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.EntityFactory;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericEntityException;
@@ -149,7 +148,7 @@
          // now we need to get the encrypted version of the fin account code the user passed in to look up against FinAccount
          // we do this by making a temporary generic entity with same finAccountCode and then doing a match
          ModelEntity finAccountEntity = delegator.getModelEntity("FinAccount");
-         GenericEntity encryptedFinAccount = EntityFactory.createGenericEntity(finAccountEntity, UtilMisc.toMap("finAccountCode", finAccountCode));
+         GenericEntity encryptedFinAccount = GenericEntity.createGenericEntity(finAccountEntity, UtilMisc.toMap("finAccountCode", finAccountCode));
          delegator.encryptFields(encryptedFinAccount);
          String encryptedFinAccountCode = encryptedFinAccount.getString("finAccountCode");
 

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Tue Aug 18 18:10:44 2009
@@ -26,9 +26,10 @@
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.*;
 import org.ofbiz.entity.model.DynamicViewEntity;
-import org.ofbiz.entity.model.ModelFactory;
+import org.ofbiz.entity.model.ModelKeyMap;
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.security.Security;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
@@ -88,11 +89,11 @@
         }
 
         // dynamic view entity
-        DynamicViewEntity dve = ModelFactory.createDynamicViewEntity();
+        DynamicViewEntity dve = new DynamicViewEntity();
         dve.addMemberEntity("OH", "OrderHeader");
         dve.addAliasAll("OH", ""); // no prefix
-        dve.addRelation("one-nofk", "", "OrderType", UtilMisc.toList(ModelFactory.createModelKeyMap("orderTypeId", "orderTypeId")));
-        dve.addRelation("one-nofk", "", "StatusItem", UtilMisc.toList(ModelFactory.createModelKeyMap("statusId", "statusId")));
+        dve.addRelation("one-nofk", "", "OrderType", UtilMisc.toList(new ModelKeyMap("orderTypeId", "orderTypeId")));
+        dve.addRelation("one-nofk", "", "StatusItem", UtilMisc.toList(new ModelKeyMap("statusId", "statusId")));
 
         // start the lookup
         String orderId = (String) context.get("orderId");
@@ -273,7 +274,7 @@
             dve.addMemberEntity("OISG", "OrderItemShipGroup");
             dve.addAlias("OISG", "shipmentMethodTypeId");
             dve.addAlias("OISG", "carrierPartyId");
-            dve.addViewLink("OH", "OISG", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "OISG", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
 
             if (UtilValidate.isNotEmpty(carrierPartyId)) {
                 paramList.add("carrierPartyId=" + carrierPartyId);
@@ -294,8 +295,8 @@
             dve.addAlias("OPP", "orderPaymentPreferenceId");
             dve.addAlias("PGR", "gatewayAvsResult");
             dve.addAlias("PGR", "gatewayScoreResult");
-            dve.addViewLink("OH", "OPP", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
-            dve.addViewLink("OPP", "PGR", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderPaymentPreferenceId", "orderPaymentPreferenceId")));
+            dve.addViewLink("OH", "OPP", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OPP", "PGR", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderPaymentPreferenceId", "orderPaymentPreferenceId")));
         }
 
         if (UtilValidate.isNotEmpty(gatewayAvsResult)) {
@@ -313,7 +314,7 @@
             dve.addMemberEntity("OT", "OrderRole");
             dve.addAlias("OT", "partyId");
             dve.addAlias("OT", "roleTypeId");
-            dve.addViewLink("OH", "OT", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "OT", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
         }
 
         if (UtilValidate.isNotEmpty(partyId)) {
@@ -348,7 +349,7 @@
             dve.addAlias("OI", "productId");
             dve.addAlias("OI", "budgetId");
             dve.addAlias("OI", "quoteId");
-            dve.addViewLink("OH", "OI", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "OI", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
         }
 
         if (UtilValidate.isNotEmpty(correspondingPoId)) {
@@ -421,7 +422,7 @@
             dve.addAlias("OP", "billingAccountId");
             dve.addAlias("OP", "finAccountId");
             dve.addAlias("OP", "paymentMethodId");
-            dve.addViewLink("OH", "OP", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "OP", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
         }
 
         // search by billing account ID
@@ -440,7 +441,7 @@
         if (UtilValidate.isNotEmpty(cardNumber)) {
             dve.addMemberEntity("CC", "CreditCard");
             dve.addAlias("CC", "cardNumber");
-            dve.addViewLink("OP", "CC", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("paymentMethodId", "paymentMethodId")));
+            dve.addViewLink("OP", "CC", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("paymentMethodId", "paymentMethodId")));
 
             paramList.add("cardNumber=" + cardNumber);
             conditions.add(makeExpr("cardNumber", cardNumber));
@@ -450,7 +451,7 @@
         if (UtilValidate.isNotEmpty(accountNumber)) {
             dve.addMemberEntity("EF", "EftAccount");
             dve.addAlias("EF", "accountNumber");
-            dve.addViewLink("OP", "EF", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("paymentMethodId", "paymentMethodId")));
+            dve.addViewLink("OP", "EF", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("paymentMethodId", "paymentMethodId")));
 
             paramList.add("accountNumber=" + accountNumber);
             conditions.add(makeExpr("accountNumber", accountNumber));
@@ -466,13 +467,13 @@
             dve.addMemberEntity("II", "ItemIssuance");
             dve.addAlias("II", "shipmentId");
             dve.addAlias("II", "inventoryItemId");
-            dve.addViewLink("OH", "II", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "II", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
 
             if (softIdentifier != null || serialNumber != null) {
                 dve.addMemberEntity("IV", "InventoryItem");
                 dve.addAlias("IV", "softIdentifier");
                 dve.addAlias("IV", "serialNumber");
-                dve.addViewLink("II", "IV", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("inventoryItemId", "inventoryItemId")));
+                dve.addViewLink("II", "IV", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("inventoryItemId", "inventoryItemId")));
             }
         }
 
@@ -501,7 +502,7 @@
         if (UtilValidate.isNotEmpty(hasBackOrders)) {
             dve.addMemberEntity("IR", "OrderItemShipGrpInvRes");
             dve.addAlias("IR", "quantityNotAvailable");
-            dve.addViewLink("OH", "IR", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
+            dve.addViewLink("OH", "IR", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
 
             paramList.add("hasBackOrders=" + hasBackOrders);
             if ("Y".equals(hasBackOrders)) {
@@ -527,8 +528,8 @@
             dve.addAlias("OCM", "contactMechId");
             dve.addAlias("OCM", "contactMechPurposeTypeId");
             dve.addAlias("PA", "countryGeoId");
-            dve.addViewLink("OH", "OCM", Boolean.FALSE, ModelFactory.makeKeyMapList("orderId"));
-            dve.addViewLink("OCM", "PA", Boolean.FALSE, ModelFactory.makeKeyMapList("contactMechId"));
+            dve.addViewLink("OH", "OCM", Boolean.FALSE, ModelKeyMap.makeKeyMapList("orderId"));
+            dve.addViewLink("OCM", "PA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
             
             EntityConditionList exprs = null;
             if ("Y".equals(includeCountry)) {

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue Aug 18 18:10:44 2009
@@ -49,8 +49,8 @@
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
 import org.ofbiz.common.DataModelConstants;
-import org.ofbiz.entity.EntityFactory;
 import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
@@ -2865,9 +2865,9 @@
                 itemsExprs.add(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId));
                 itemsExprs.add(EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_CREATED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_APPROVED")), EntityOperator.OR));
-                itemsExprs.add(EntityCondition.makeCondition("dontCancelSetUserLogin", EntityOperator.EQUALS, EntityFactory.NULL_FIELD));
-                itemsExprs.add(EntityCondition.makeCondition("dontCancelSetDate", EntityOperator.EQUALS, EntityFactory.NULL_FIELD));
-                itemsExprs.add(EntityCondition.makeCondition("autoCancelDate", EntityOperator.NOT_EQUAL, EntityFactory.NULL_FIELD));
+                itemsExprs.add(EntityCondition.makeCondition("dontCancelSetUserLogin", EntityOperator.EQUALS, GenericEntity.NULL_FIELD));
+                itemsExprs.add(EntityCondition.makeCondition("dontCancelSetDate", EntityOperator.EQUALS, GenericEntity.NULL_FIELD));
+                itemsExprs.add(EntityCondition.makeCondition("autoCancelDate", EntityOperator.NOT_EQUAL, GenericEntity.NULL_FIELD));
 
                 ecl = EntityCondition.makeCondition(itemsExprs);
 

Modified: ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java Tue Aug 18 18:10:44 2009
@@ -44,7 +44,7 @@
 import org.ofbiz.entity.condition.EntityFunction;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.DynamicViewEntity;
-import org.ofbiz.entity.model.ModelFactory;
+import org.ofbiz.entity.model.ModelKeyMap;
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityTypeUtil;
@@ -1066,15 +1066,15 @@
             paramList = paramList + "&lookupFlag=" + lookupFlag + "&showAll=" + showAll + "&extInfo=" + extInfo;
 
             // create the dynamic view entity
-            DynamicViewEntity dynamicView = ModelFactory.createDynamicViewEntity();
+            DynamicViewEntity dynamicView = new DynamicViewEntity();
 
             // default view settings
             dynamicView.addMemberEntity("PT", "Party");
             dynamicView.addAlias("PT", "partyId");
             dynamicView.addAlias("PT", "statusId");
             dynamicView.addAlias("PT", "partyTypeId");
-            dynamicView.addRelation("one-nofk", "", "PartyType", ModelFactory.makeKeyMapList("partyTypeId"));
-            dynamicView.addRelation("many", "", "UserLogin", ModelFactory.makeKeyMapList("partyId"));
+            dynamicView.addRelation("one-nofk", "", "PartyType", ModelKeyMap.makeKeyMapList("partyTypeId"));
+            dynamicView.addRelation("many", "", "UserLogin", ModelKeyMap.makeKeyMapList("partyId"));
 
             // define the main condition & expression list
             List<EntityCondition> andExprs = FastList.newInstance();
@@ -1094,7 +1094,7 @@
                 dynamicView.addMemberEntity("PRSHP", "PartyRelationship");
                 dynamicView.addAlias("PRSHP", "partyIdTo");
                 dynamicView.addAlias("PRSHP", "partyRelationshipTypeId");
-                dynamicView.addViewLink("PT", "PRSHP", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId", "partyIdTo"));
+                dynamicView.addViewLink("PT", "PRSHP", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId", "partyIdTo"));
                 List<String> ownerPartyIds = (List) context.get("ownerPartyIds");
                 EntityCondition relationshipCond = null;
                 if (UtilValidate.isEmpty(ownerPartyIds)) {
@@ -1154,7 +1154,7 @@
                     // modify the dynamic view
                     dynamicView.addMemberEntity("UL", "UserLogin");
                     dynamicView.addAlias("UL", "userLoginId");
-                    dynamicView.addViewLink("PT", "UL", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PT", "UL", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
                     andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+userLoginId+"%")));
@@ -1173,7 +1173,7 @@
                     // modify the dynamic view
                     dynamicView.addMemberEntity("PG", "PartyGroup");
                     dynamicView.addAlias("PG", "groupName");
-                    dynamicView.addViewLink("PT", "PG", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PT", "PG", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
                     andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("groupName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+groupName+"%")));
@@ -1190,7 +1190,7 @@
                     dynamicView.addMemberEntity("PE", "Person");
                     dynamicView.addAlias("PE", "firstName");
                     dynamicView.addAlias("PE", "lastName");
-                    dynamicView.addViewLink("PT", "PE", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PT", "PE", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     fieldsToSelect.add("firstName");
                     fieldsToSelect.add("lastName");
@@ -1221,7 +1221,7 @@
                     // add role to view
                     dynamicView.addMemberEntity("PR", "PartyRole");
                     dynamicView.addAlias("PR", "roleTypeId");
-                    dynamicView.addViewLink("PT", "PR", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PT", "PR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
                     andExprs.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, roleTypeId));
@@ -1244,7 +1244,7 @@
                     // add role to view
                     dynamicView.addMemberEntity("II", "InventoryItem");
                     dynamicView.addAlias("II", "ownerPartyId");
-                    dynamicView.addViewLink("PT", "II", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId", "ownerPartyId"));
+                    dynamicView.addViewLink("PT", "II", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId", "ownerPartyId"));
                 }
                 if (UtilValidate.isNotEmpty(inventoryItemId)) {
                     paramList = paramList + "&inventoryItemId=" + inventoryItemId;
@@ -1282,8 +1282,8 @@
                     dynamicView.addAlias("PA", "stateProvinceGeoId");
                     dynamicView.addAlias("PA", "countryGeoId");
                     dynamicView.addAlias("PA", "postalCode");
-                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
-                    dynamicView.addViewLink("PC", "PA", Boolean.FALSE, ModelFactory.makeKeyMapList("contactMechId"));
+                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PC", "PA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
 
                     // filter on address1
                     String address1 = (String) context.get("address1");
@@ -1333,8 +1333,8 @@
                     dynamicView.addMemberEntity("CM", "ContactMech");
                     dynamicView.addAlias("PC", "contactMechId");
                     dynamicView.addAlias("CM", "infoString");
-                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
-                    dynamicView.addViewLink("PC", "CM", Boolean.FALSE, ModelFactory.makeKeyMapList("contactMechId"));
+                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PC", "CM", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
 
                     // filter on infoString
                     String infoString = (String) context.get("infoString");
@@ -1357,8 +1357,8 @@
                     dynamicView.addAlias("TM", "countryCode");
                     dynamicView.addAlias("TM", "areaCode");
                     dynamicView.addAlias("TM", "contactNumber");
-                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelFactory.makeKeyMapList("partyId"));
-                    dynamicView.addViewLink("PC", "TM", Boolean.FALSE, ModelFactory.makeKeyMapList("contactMechId"));
+                    dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
+                    dynamicView.addViewLink("PC", "TM", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
 
                     // filter on countryCode
                     String countryCode = (String) context.get("countryCode");

Modified: ofbiz/branches/executioncontext20090812/applications/product/data/ProductHelpData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/data/ProductHelpData.xml?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/product/data/ProductHelpData.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/product/data/ProductHelpData.xml Tue Aug 18 18:10:44 2009
@@ -18,24 +18,7 @@
 under the License.
 -->
 <entity-engine-xml>
-    <!-- =======Help===========  -->
-    <DataResource dataResourceId="HELP_PRODUCT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Catalog Manager Help" mimeTypeId="text/xml" isPublic="Y" />
-    <ElectronicText dataResourceId="HELP_PRODUCT">
-        <textData><![CDATA[
-            <root>
-                <generalTitle>
-                    The Catalog Manager.
-                </generalTitle>
-                <general>
-                  <section>
-                    <text>
-                      The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories.
-                    </text>
-                 </section>
-                </general>
-            </root>
-        ]]></textData>
-    </ElectronicText>
-    <Content contentId="HELP_PRODUCT" contentTypeId="DOCUMENT" contentName="Catalog Manager Help" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_PRODUCT" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
+    <DataResource dataResourceId="HELP_PRODUCT" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/product/data/helpdata/HELP_PRODUCT.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system Product" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="HELP_PRODUCT" contentTypeId="DOCUMENT" localeString="en" contentName="Catalog Manager Help" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_PRODUCT" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
     <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_PRODUCT" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="020"/>
 </entity-engine-xml>

Added: ofbiz/branches/executioncontext20090812/applications/product/data/helpdata/HELP_PRODUCT.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/data/helpdata/HELP_PRODUCT.xml?rev=805519&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/product/data/helpdata/HELP_PRODUCT.xml (added)
+++ ofbiz/branches/executioncontext20090812/applications/product/data/helpdata/HELP_PRODUCT.xml Tue Aug 18 18:10:44 2009
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<root>
+    <generalTitle>
+        The Catalog Manager.
+    </generalTitle>
+    <general>
+        <section>
+            <text>
+                The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories.
+            </text>
+        </section>
+    </general>
+</root>

Modified: ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Tue Aug 18 18:10:44 2009
@@ -42,7 +42,7 @@
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.DynamicViewEntity;
-import org.ofbiz.entity.model.ModelFactory;
+import org.ofbiz.entity.model.ModelKeyMap;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
@@ -873,8 +873,8 @@
             }
         }
 
-        DynamicViewEntity salesUsageViewEntity = ModelFactory.createDynamicViewEntity();
-        DynamicViewEntity productionUsageViewEntity = ModelFactory.createDynamicViewEntity();
+        DynamicViewEntity salesUsageViewEntity = new DynamicViewEntity();
+        DynamicViewEntity productionUsageViewEntity = new DynamicViewEntity();
         if (! UtilValidate.isEmpty(checkTime)) {
 
             // Construct a dynamic view entity to search against for sales usage quantities
@@ -882,9 +882,9 @@
             salesUsageViewEntity.addMemberEntity("OH", "OrderHeader");
             salesUsageViewEntity.addMemberEntity("ItIss", "ItemIssuance");
             salesUsageViewEntity.addMemberEntity("InvIt", "InventoryItem");
-            salesUsageViewEntity.addViewLink("OI", "OH", Boolean.valueOf(false), ModelFactory.makeKeyMapList("orderId"));
-            salesUsageViewEntity.addViewLink("OI", "ItIss", Boolean.valueOf(false), ModelFactory.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"));
-            salesUsageViewEntity.addViewLink("ItIss", "InvIt", Boolean.valueOf(false), ModelFactory.makeKeyMapList("inventoryItemId"));
+            salesUsageViewEntity.addViewLink("OI", "OH", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("orderId"));
+            salesUsageViewEntity.addViewLink("OI", "ItIss", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"));
+            salesUsageViewEntity.addViewLink("ItIss", "InvIt", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
             salesUsageViewEntity.addAlias("OI", "productId");
             salesUsageViewEntity.addAlias("OH", "statusId");
             salesUsageViewEntity.addAlias("OH", "orderTypeId");
@@ -897,8 +897,8 @@
             productionUsageViewEntity.addMemberEntity("WEIA", "WorkEffortInventoryAssign");
             productionUsageViewEntity.addMemberEntity("WE", "WorkEffort");
             productionUsageViewEntity.addMemberEntity("II", "InventoryItem");
-            productionUsageViewEntity.addViewLink("WEIA", "WE", Boolean.valueOf(false), ModelFactory.makeKeyMapList("workEffortId"));
-            productionUsageViewEntity.addViewLink("WEIA", "II", Boolean.valueOf(false), ModelFactory.makeKeyMapList("inventoryItemId"));
+            productionUsageViewEntity.addViewLink("WEIA", "WE", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("workEffortId"));
+            productionUsageViewEntity.addViewLink("WEIA", "II", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
             productionUsageViewEntity.addAlias("WEIA", "quantity");
             productionUsageViewEntity.addAlias("WE", "actualCompletionDate");
             productionUsageViewEntity.addAlias("WE", "workEffortTypeId");

Modified: ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java Tue Aug 18 18:10:44 2009
@@ -49,8 +49,9 @@
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.config.EntityConfigUtil;
 import org.ofbiz.entity.model.DynamicViewEntity;
-import org.ofbiz.entity.model.ModelFactory;
-import org.ofbiz.entity.model.ModelViewEntity.*;
+import org.ofbiz.entity.model.ModelKeyMap;
+import org.ofbiz.entity.model.ModelViewEntity.ComplexAlias;
+import org.ofbiz.entity.model.ModelViewEntity.ComplexAliasField;
 import org.ofbiz.entity.transaction.GenericTransactionException;
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityFindOptions;
@@ -143,7 +144,7 @@
         public List<EntityCondition> entityConditionList = FastList.newInstance();
         public List<String> orderByList = FastList.newInstance();
         public List<String> fieldsToSelect = UtilMisc.toList("mainProductId");
-        public DynamicViewEntity dynamicViewEntity = ModelFactory.createDynamicViewEntity();
+        public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity();
         public boolean productIdGroupBy = false;
         public boolean includedKeywordSearch = false;
         public Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
@@ -185,7 +186,7 @@
             this.visitId = visitId;
             dynamicViewEntity.addMemberEntity("PROD", "Product");
             dynamicViewEntity.addMemberEntity("PRODCI", "ProductCalculatedInfo");
-            dynamicViewEntity.addViewLink("PROD", "PRODCI", Boolean.TRUE, ModelFactory.makeKeyMapList("productId"));
+            dynamicViewEntity.addViewLink("PROD", "PRODCI", Boolean.TRUE, ModelKeyMap.makeKeyMapList("productId"));
         }
 
         public GenericDelegator getDelegator() {
@@ -269,7 +270,7 @@
 
             Debug.logInfo("Finished initial setup of keywords, doingBothAndOr=" + doingBothAndOr + ", andKeywordFixedSet=" + andKeywordFixedSet + "\n keywordFixedOrSetAndList=" + keywordFixedOrSetAndList, module);
 
-            ComplexAlias relevancyComplexAlias = ModelFactory.createComplexAlias("+");
+            ComplexAlias relevancyComplexAlias = new ComplexAlias("+");
             if (andKeywordFixedSet.size() > 0) {
                 // add up the relevancyWeight fields from all keyword member entities for a total to sort by
 
@@ -281,7 +282,7 @@
 
                     dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword");
                     dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     entityConditionList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
 
                     //don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null);
@@ -289,7 +290,7 @@
                     if (doingBothAndOr) {
                         dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, Boolean.TRUE, null);
                     }
-                    relevancyComplexAlias.addComplexAliasMember(ModelFactory.createComplexAliasField(entityAlias, "relevancyWeight", null, null));
+                    relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, null));
                 }
 
                 //TODO: find out why Oracle and other dbs don't like the query resulting from this and fix: productIdGroupBy = true;
@@ -307,7 +308,7 @@
 
                     dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword");
                     dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     List<EntityCondition> keywordOrList = FastList.newInstance();
                     for (String keyword: keywordFixedOrSet) {
                         keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
@@ -317,7 +318,7 @@
                     productIdGroupBy = true;
 
                     if (doingBothAndOr) {
-                        relevancyComplexAlias.addComplexAliasMember(ModelFactory.createComplexAliasField(entityAlias, "relevancyWeight", null, "sum"));
+                        relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, "sum"));
                     } else {
                         dynamicViewEntity.addAlias(entityAlias, "totalRelevancy", "relevancyWeight", null, null, null, "sum");
                     }
@@ -360,7 +361,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(categoryPrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(categoryPrefix + "ProductCategoryId", EntityOperator.EQUALS, includeCategoryId));
@@ -376,7 +377,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ProductFeatureId", "productFeatureId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "ProductFeatureId", EntityOperator.EQUALS, includeFeatureId));
@@ -395,8 +396,8 @@
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "ProductFeatureCategoryId", "productFeatureCategoryId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
-                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productFeatureId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productFeatureId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(otherFeaturePrefix + "ProductFeatureCategoryId", EntityOperator.EQUALS, includeFeatureCategoryId));
@@ -417,8 +418,8 @@
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
-                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productFeatureId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productFeatureId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(otherFeaturePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(otherFeaturePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
@@ -471,7 +472,7 @@
                 this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
                 this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "FromDate", "fromDate", null, null, null, null);
                 this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ThruDate", "thruDate", null, null, null, null);
-                this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                 alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                 alwIncCondList.add(EntityCondition.makeCondition(categoryPrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                 alwIncCondList.add(EntityCondition.makeCondition(categoryPrefix + "ProductCategoryId", EntityOperator.IN, alwaysIncludeCategoryIds));
@@ -485,7 +486,7 @@
                 this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ProductFeatureId", "productFeatureId", null, null, null, null);
                 this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                 this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                 alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                 alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                 alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "ProductFeatureId", EntityOperator.IN, alwaysIncludeFeatureIds));
@@ -503,8 +504,8 @@
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "ProductFeatureCategoryId", "productFeatureCategoryId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
-                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productFeatureId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productFeatureId"));
                     alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     alwIncCondList.add(EntityCondition.makeCondition(otherFeaturePrefix + "ProductFeatureCategoryId", EntityOperator.EQUALS, alwaysIncludeFeatureCategoryId));
@@ -525,8 +526,8 @@
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(otherEntityAlias, otherFeaturePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
-                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productFeatureId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink(entityAlias, otherEntityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productFeatureId"));
                     alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(otherFeaturePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(otherFeaturePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
@@ -546,7 +547,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ProductFeatureId", "productFeatureId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(featurePrefix + "ProductFeatureId", EntityOperator.IN, includeFeatureIdOrSet));
@@ -562,7 +563,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ProductFeatureId", "productFeatureId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, featurePrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(featurePrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     alwIncCondList.add(EntityCondition.makeCondition(featurePrefix + "ProductFeatureId", EntityOperator.IN, alwaysIncludeFeatureIdOrSet));
@@ -580,7 +581,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     incExcCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     incExcCondList.add(EntityCondition.makeCondition(categoryPrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     incExcCondList.add(EntityCondition.makeCondition(categoryPrefix + "ProductCategoryId", EntityOperator.IN, includeCategoryIdOrSet));
@@ -596,7 +597,7 @@
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "FromDate", "fromDate", null, null, null, null);
                     this.dynamicViewEntity.addAlias(entityAlias, categoryPrefix + "ThruDate", "thruDate", null, null, null, null);
-                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    this.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     alwIncCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(categoryPrefix + "ThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
                     alwIncCondList.add(EntityCondition.makeCondition(categoryPrefix + "FromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
                     alwIncCondList.add(EntityCondition.makeCondition(categoryPrefix + "ProductCategoryId", EntityOperator.IN, alwaysIncludeCategoryIdOrSet));
@@ -844,7 +845,7 @@
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductCategoryId", EntityOperator.IN, productCategoryIds));
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, productSearchContext.nowTimestamp)));
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, productSearchContext.nowTimestamp));
@@ -1518,7 +1519,7 @@
             context.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             context.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
 
-            context.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+            context.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
 
             context.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductPriceTypeId", EntityOperator.EQUALS, productPriceTypeId));
             context.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductPricePurposeId", EntityOperator.EQUALS, "PURCHASE"));
@@ -1581,7 +1582,7 @@
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "Price", "price", null, null, null, null);
 
-            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
 
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductPriceTypeId", EntityOperator.EQUALS, "LIST_PRICE"));
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductPricePurposeId", EntityOperator.EQUALS, "PURCHASE"));
@@ -1675,7 +1676,7 @@
 
             productSearchContext.dynamicViewEntity.addMemberEntity(entityAlias, "SupplierProduct");
             productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "SupplierPartyId", "partyId", null, null, null, null);
-            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+            productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
             productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "SupplierPartyId", EntityOperator.EQUALS, supplierPartyId));
 
             // add in productSearchConstraint, don't worry about the productSearchResultId or constraintSeqId, those will be fill in later
@@ -1812,7 +1813,7 @@
                     productSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "GoodIdentificationValue", operator, goodIdentificationValue));
                 }
 
-                productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                productSearchContext.dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
 
                 productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint",
                         UtilMisc.toMap("constraintName", constraintName, "infoString", "goodIdentificationTypeId [" + this.goodIdentificationTypeId + "] goodIdentificationValue [" + this.goodIdentificationValue + "] include [" + this.include + "]")));
@@ -1991,7 +1992,7 @@
 
             // SortProductPrice, this will be a bit more complex, need to add a ProductPrice member entity
             productSearchContext.dynamicViewEntity.addMemberEntity("SPPRC", "ProductPrice");
-            productSearchContext.dynamicViewEntity.addViewLink("PROD", "SPPRC", Boolean.TRUE, UtilMisc.toList(ModelFactory.createModelKeyMap("productId", "productId")));
+            productSearchContext.dynamicViewEntity.addViewLink("PROD", "SPPRC", Boolean.TRUE, UtilMisc.toList(new ModelKeyMap("productId", "productId")));
             productSearchContext.dynamicViewEntity.addAlias("SPPRC", "sortProductPriceTypeId", "productPriceTypeId", null, null, null, null);
             productSearchContext.dynamicViewEntity.addAlias("SPPRC", "sortCurrencyUomId", "currencyUomId", null, null, null, null);
             productSearchContext.dynamicViewEntity.addAlias("SPPRC", "sortProductStoreGroupId", "productStoreGroupId", null, null, null, null);
@@ -2061,7 +2062,7 @@
         List entityConditionList = new FastList.newInstance();
         List orderByList = new FastList.newInstance();
         List fieldsToSelect = UtilMisc.toList("productId");
-        DynamicViewEntity dynamicViewEntity = ModelFactory.createDynamicViewEntity();
+        DynamicViewEntity dynamicViewEntity = new DynamicViewEntity();
         dynamicViewEntity.addMemberEntity("PROD", "Product");
         dynamicViewEntity.addAlias("PROD", "productName");
         boolean productIdGroupBy = false;
@@ -2087,7 +2088,7 @@
             dynamicViewEntity.addAlias(entityAlias, prefix + "ProductCategoryId", "productCategoryId", null, null, null, null);
             dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+            dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
             entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductCategoryId", EntityOperator.IN, productCategoryIdList));
             entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
             entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, nowTimestamp));
@@ -2100,7 +2101,7 @@
         if (keywordList.size() > 0) {
             if (isAnd) {
                 // add up the relevancyWeight fields from all keyword member entities for a total to sort by
-                ComplexAlias complexAlias = ModelFactory.createComplexAlias("+");
+                ComplexAlias complexAlias = new ComplexAlias("+");
 
                 for (String keyword: keywordList) {
                     // make index based values and increment
@@ -2110,11 +2111,11 @@
 
                     dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword");
                     dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                    dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                     entityConditionList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
 
                     //don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null);
-                    complexAlias.addComplexAliasMember(ModelFactory.createComplexAliasField(entityAlias, "relevancyWeight"));
+                    complexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight"));
                 }
                 dynamicViewEntity.addAlias(null, "totalRelevancy", null, null, null, null, null, complexAlias);
                 orderByList.add("-totalRelevancy");
@@ -2128,7 +2129,7 @@
                 dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword");
                 dynamicViewEntity.addAlias(entityAlias, "totalRelevancy", "relevancyWeight", null, null, null, "sum");
                 dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                 orderByList.add("-totalRelevancy");
                 fieldsToSelect.add("totalRelevancy");
                 List<EntityCondition> keywordOrList = new FastList.newInstance();
@@ -2153,7 +2154,7 @@
                 dynamicViewEntity.addAlias(entityAlias, prefix + "ProductFeatureId", "productFeatureId", null, null, null, null);
                 dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
                 dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-                dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("productId"));
+                dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
                 entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductFeatureId", EntityOperator.EQUALS, productFeatureId));
                 entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
                 entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, nowTimestamp));

Modified: ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java Tue Aug 18 18:10:44 2009
@@ -42,7 +42,7 @@
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.DynamicViewEntity;
 import org.ofbiz.entity.model.ModelEntity;
-import org.ofbiz.entity.model.ModelFactory;
+import org.ofbiz.entity.model.ModelKeyMap;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.service.DispatchContext;
@@ -175,7 +175,7 @@
         String errMsg = null;
 
         try {
-            DynamicViewEntity dve = ModelFactory.createDynamicViewEntity();
+            DynamicViewEntity dve = new DynamicViewEntity();
             dve.addMemberEntity("PCM", "ProductCategoryMember");
             dve.addAlias("PCM", "productId", null, null, null, Boolean.TRUE, null);
             dve.addAlias("PCM", "productCategoryId", null, null, null, Boolean.TRUE, null);
@@ -227,12 +227,12 @@
 
         Debug.logInfo("Starting makeStandAloneFromSingleVariantVirtuals", module);
 
-        DynamicViewEntity dve = ModelFactory.createDynamicViewEntity();
+        DynamicViewEntity dve = new DynamicViewEntity();
         dve.addMemberEntity("PVIRT", "Product");
         dve.addMemberEntity("PVA", "ProductAssoc");
         //dve.addMemberEntity("PVAR", "Product");
-        dve.addViewLink("PVIRT", "PVA", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("productId", "productId")));
-        //dve.addViewLink("PVA", "PVAR", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("productIdTo", "productId")));
+        dve.addViewLink("PVIRT", "PVA", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("productId", "productId")));
+        //dve.addViewLink("PVA", "PVAR", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("productIdTo", "productId")));
         dve.addAlias("PVIRT", "productId", null, null, null, Boolean.TRUE, null);
         dve.addAlias("PVIRT", "salesDiscontinuationDate", null, null, null, null, null);
         dve.addAlias("PVA", "productAssocTypeId", null, null, null, null, null);

Modified: ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Tue Aug 18 18:10:44 2009
@@ -44,12 +44,13 @@
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
 import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityFieldValue;
 import org.ofbiz.entity.condition.EntityFunction;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.DynamicViewEntity;
-import org.ofbiz.entity.model.ModelFactory;
-import org.ofbiz.entity.model.ModelUtil;
-import org.ofbiz.entity.model.ModelViewEntity.*;
+import org.ofbiz.entity.model.ModelKeyMap;
+import org.ofbiz.entity.model.ModelViewEntity.ComplexAlias;
+import org.ofbiz.entity.model.ModelViewEntity.ComplexAliasField;
 import org.ofbiz.entity.transaction.GenericTransactionException;
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityFindOptions;
@@ -139,7 +140,7 @@
         public List<EntityCondition> entityConditionList = FastList.newInstance();
         public List<String> orderByList = FastList.newInstance();
         public List<String> fieldsToSelect = UtilMisc.toList("workEffortId");
-        public DynamicViewEntity dynamicViewEntity = ModelFactory.createDynamicViewEntity();
+        public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity();
         public boolean workEffortIdGroupBy = false;
         public boolean includedKeywordSearch = false;
         public Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
@@ -241,7 +242,7 @@
 
             Debug.logInfo("Finished initial setup of keywords, doingBothAndOr=" + doingBothAndOr + ", andKeywordFixedSet=" + andKeywordFixedSet + "\n keywordFixedOrSetAndList=" + keywordFixedOrSetAndList, module);
 
-            ComplexAlias relevancyComplexAlias = ModelFactory.createComplexAlias("+");
+            ComplexAlias relevancyComplexAlias = new ComplexAlias("+");
             if (andKeywordFixedSet.size() > 0) {
                 // add up the relevancyWeight fields from all keyword member entities for a total to sort by
 
@@ -253,11 +254,11 @@
 
                     dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortKeyword");
                     dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                    dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("workEffortId"));
+                    dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
                     entityConditionList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
 
                     //don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null);
-                    relevancyComplexAlias.addComplexAliasMember(ModelFactory.createComplexAliasField(entityAlias, "relevancyWeight", null, null));
+                    relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, null));
                 }
 
                 //TODO: find out why Oracle and other dbs don't like the query resulting from this and fix: workEffortIdGroupBy = true;
@@ -275,7 +276,7 @@
 
                     dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortKeyword");
                     dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
-                    dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("workEffortId"));
+                    dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
                     List<EntityExpr> keywordOrList = FastList.newInstance();
                     for (String keyword: keywordFixedOrSet) {
                         keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
@@ -285,7 +286,7 @@
                     workEffortIdGroupBy = true;
 
                     if (doingBothAndOr) {
-                        relevancyComplexAlias.addComplexAliasMember(ModelFactory.createComplexAliasField(entityAlias, "relevancyWeight", null, "sum"));
+                        relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, "sum"));
                     } else {
                         dynamicViewEntity.addAlias(entityAlias, "totalRelevancy", "relevancyWeight", null, null, null, "sum");
                     }
@@ -532,7 +533,7 @@
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "WorkEffortAssocTypeId", "workEffortAssocTypeId", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelFactory.makeKeyMapList("workEffortId","workEffortIdFrom"));
+            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdFrom"));
 
             List<EntityExpr> assocConditionFromTo = FastList.newInstance();
             assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortIdTo", EntityOperator.IN, workEffortIdSet));
@@ -553,7 +554,7 @@
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "WorkEffortAssocTypeId", "workEffortAssocTypeId", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelFactory.makeKeyMapList("workEffortId","workEffortIdTo"));
+            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdTo"));
 
             List<EntityExpr> assocConditionToFrom = FastList.newInstance();
             assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortIdFrom", EntityOperator.IN, workEffortIdSet));
@@ -658,7 +659,7 @@
 
             workEffortSearchContext.dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortReview");
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ReviewText", "reviewText", null, null, null, null);
-            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("workEffortId"));
+            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
             workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD(prefix + "ReviewText"), EntityOperator.LIKE, EntityFunction.UPPER("%" + reviewTextString + "%")));
             Map<String, String> valueMap = UtilMisc.toMap("constraintName", constraintName, "infoString", this.reviewTextString);
             workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", valueMap));
@@ -717,7 +718,7 @@
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "RoleTypeId", "roleTypeId", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("workEffortId"));
+            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
 
             workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "PartyId", EntityOperator.EQUALS, partyId));
             workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
@@ -824,7 +825,7 @@
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ProductId", "productId", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null);
             workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
-            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelFactory.makeKeyMapList("workEffortId"));
+            workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
 
             workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductId", EntityOperator.IN, productIdSet));
             workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));

Modified: ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java (original)
+++ ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java Tue Aug 18 18:10:44 2009
@@ -77,6 +77,11 @@
     }
 
     public void popExecutionArtifact() {
+     if (this.artifactStack.size() == 0) {
+     // This check is temporary - it will be removed when implementation is complete
+     Debug.logError(new Exception("Attempt to pop an empty stack"), module);
+     return;
+     }
     ExecutionArtifact artifact = this.artifactStack.pop();
     if (this.verbose) {
      Debug.logInfo("Popping artifact [" + artifact.getClass().getName() +

Modified: ofbiz/branches/executioncontext20090812/framework/entity/src/org/ofbiz/entity/DelegatorImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/entity/src/org/ofbiz/entity/DelegatorImpl.java?rev=805519&r1=805518&r2=805519&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/framework/entity/src/org/ofbiz/entity/DelegatorImpl.java (original)
+++ ofbiz/branches/executioncontext20090812/framework/entity/src/org/ofbiz/entity/DelegatorImpl.java Tue Aug 18 18:10:44 2009
@@ -1713,7 +1713,7 @@
             fields.put(keyMap.getRelFieldName(), value.get(keyMap.getFieldName()));
         }
 
-        GenericPK dummyPK = EntityFactory.createGenericPK(relatedEntity, fields);
+        GenericPK dummyPK = GenericPK.create(relatedEntity, fields);
         dummyPK.setDelegator(this);
         return dummyPK;
     }
@@ -1892,7 +1892,7 @@
         if (entity == null) {
             throw new IllegalArgumentException("[GenericDelegator.makePK] could not find entity for entityName: " + entityName);
         }
-        GenericPK pk = EntityFactory.createGenericPK(entity, fields);
+        GenericPK pk = GenericPK.create(entity, fields);
 
         pk.setDelegator(this);
         return pk;
@@ -1907,7 +1907,7 @@
         if (entity == null) {
             throw new IllegalArgumentException("[GenericDelegator.makePKSingle] could not find entity for entityName: " + entityName);
         }
-        GenericPK pk = EntityFactory.createGenericPK(entity, singlePkValue);
+        GenericPK pk = GenericPK.create(entity, singlePkValue);
 
         pk.setDelegator(this);
         return pk;
@@ -2246,7 +2246,7 @@
 
             GenericValue removedEntity = null;
             if (testMode) {
-                removedEntity = this.findOne(primaryKey.getEntityName(), primaryKey, false);
+                removedEntity = this.findOne(primaryKey.entityName, primaryKey, false);
             }
             int num = helper.removeByPrimaryKey(primaryKey);
             this.saveEntitySyncRemoveInfo(primaryKey);