You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/11/24 07:26:38 UTC

svn commit: r1641317 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java

Author: ashish
Date: Mon Nov 24 06:26:37 2014
New Revision: 1641317

URL: http://svn.apache.org/r1641317
Log:
Applied patch from jira issue - OFBIZ-5844 - Convert java files to EntityQuery.
===========================================================
Thanks Scott for reviewing and reporting an issue.

Scott's comment in email:
The where() methods don't currently support creating an entity
condition in the style used above. You'll need to wrap those three
parameters in a EntityCondition.makeCondition() method, i.e.
paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType")
.where(EntityCondition.makeCondition("paymentMethodTypeId",
EntityOperator.NOT_EQUAL, "EXT_OFFLINE")).queryList();

Attached is a patch with suggested solution.
==================================================
Thanks Arun for the contribution. 

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java?rev=1641317&r1=1641316&r2=1641317&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java Mon Nov 24 06:26:37 2014
@@ -150,7 +150,7 @@ public class OrderManagerEvents {
         List<GenericValue> paymentMethodTypes = null;
 
         try {
-            paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType").where("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE").queryList();
+            paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType").where(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE")).queryList();
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problems getting payment types", module);
             request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource_error,"OrderProblemsWithPaymentTypeLookup", locale));