svn commit: r921986 - in /ofbiz/trunk/applications: manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java order/src/org/ofbiz/order/finaccount/FinAccountHelper.java

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

svn commit: r921986 - in /ofbiz/trunk/applications: manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java order/src/org/ofbiz/order/finaccount/FinAccountHelper.java

doogie-3
Author: doogie
Date: Thu Mar 11 18:57:00 2010
New Revision: 921986

URL: http://svn.apache.org/viewvc?rev=921986&view=rev
Log:
End-user type code should not be calling the GenericEntity factory
methods.

Modified:
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java?rev=921986&r1=921985&r2=921986&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java Thu Mar 11 18:57:00 2010
@@ -75,7 +75,7 @@ public class ProductionRunEvents {
                 request.setAttribute("_ERROR_MESSAGE_", errMsg);
                 return "error";
             }
-            GenericPK key = GenericPK.create(delegator.getModelEntity("WorkEffortGoodStandard"), UtilMisc.toMap("workEffortId", (String)componentRow.get("productionRunTaskId"),
+            GenericPK key = delegator.makePK("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", (String)componentRow.get("productionRunTaskId"),
                                                                                                                 "productId", (String)componentRow.get("productId"),
                                                                                                                 "fromDate", fromDate,
                                                                                                                 "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=921986&r1=921985&r2=921986&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Thu Mar 11 18:57:00 2010
@@ -31,14 +31,12 @@ import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilNumber;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
-import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityUtil;
 
 /**
@@ -148,8 +146,7 @@ public class FinAccountHelper {
 
          // 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 = GenericEntity.createGenericEntity(finAccountEntity, UtilMisc.toMap("finAccountCode", finAccountCode));
+         GenericValue encryptedFinAccount = delegator.makeValue("FinAccount", UtilMisc.toMap("finAccountCode", finAccountCode));
          delegator.encryptFields(encryptedFinAccount);
          String encryptedFinAccountCode = encryptedFinAccount.getString("finAccountCode");