From f9b159f79329087db33d7f980a67cbb2dc290948 Mon Sep 17 00:00:00 2001 From: Ashish Vijaywargiya Date: Mon, 24 Nov 2014 06:26:37 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641317 13f79535-47bb-0310-9956-ffa450edef68 --- applications/order/src/org/ofbiz/order/OrderManagerEvents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/order/src/org/ofbiz/order/OrderManagerEvents.java b/applications/order/src/org/ofbiz/order/OrderManagerEvents.java index 5001e76a7d..922f2c9db9 100644 --- a/applications/order/src/org/ofbiz/order/OrderManagerEvents.java +++ b/applications/order/src/org/ofbiz/order/OrderManagerEvents.java @@ -150,7 +150,7 @@ public class OrderManagerEvents { List 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));