This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push: new 7ab9d05 Improved: Handle remaining checkstyle errors (OFBIZ-12169) 7ab9d05 is described below commit 7ab9d05412ef79f0b695ce67891eaa55c0331e1a Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Sun Oct 17 11:42:38 2021 +0200 Improved: Handle remaining checkstyle errors (OFBIZ-12169) Fixes wrong methods names in EntityFunction class Forgot the plugins while working on smthg else :/ --- example/groovyScripts/FindExampleFeatures.groovy | 2 +- .../org/apache/ofbiz/webpos/search/WebPosSearch.java | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/example/groovyScripts/FindExampleFeatures.groovy b/example/groovyScripts/FindExampleFeatures.groovy index 74c826f..adfa849 100644 --- a/example/groovyScripts/FindExampleFeatures.groovy +++ b/example/groovyScripts/FindExampleFeatures.groovy @@ -27,7 +27,7 @@ delegator = request.getAttribute("delegator") andExprs = [] fieldValue = request.getParameter("exampleFeatureId") if (fieldValue) { - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER(EntityFieldValue.makeFieldValue("exampleFeatureId")), + andExprs.add(EntityCondition.makeCondition(EntityFunction.upper(EntityFieldValue.makeFieldValue("exampleFeatureId")), EntityOperator.LIKE, "%" + fieldValue.toUpperCase() + "%")) } diff --git a/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java b/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java index 2ba6161..6cac0e3 100644 --- a/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java +++ b/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java @@ -57,20 +57,20 @@ public class WebPosSearch { // search by product name if (UtilValidate.isNotEmpty(searchByProductName)) { searchByProductName = searchByProductName.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("productName"), EntityOperator.LIKE, - EntityFunction.UPPER("%" + searchByProductName + "%"))); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("productName"), EntityOperator.LIKE, + EntityFunction.upper("%" + searchByProductName + "%"))); } // search by description if (UtilValidate.isNotEmpty(searchByProductDescription)) { searchByProductDescription = searchByProductDescription.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("description"), EntityOperator.LIKE, - EntityFunction.UPPER("%" + searchByProductDescription + "%"))); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("description"), EntityOperator.LIKE, + EntityFunction.upper("%" + searchByProductDescription + "%"))); } // search by good identification if (UtilValidate.isNotEmpty(searchByProductIdValue)) { entityName = "GoodIdentificationAndProduct"; searchByProductIdValue = searchByProductIdValue.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("idValue"), EntityOperator.EQUALS, searchByProductIdValue)); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("idValue"), EntityOperator.EQUALS, searchByProductIdValue)); if (UtilValidate.isNotEmpty(goodIdentificationTypeId)) { andExprs.add(EntityCondition.makeCondition("goodIdentificationTypeId", EntityOperator.EQUALS, goodIdentificationTypeId)); } @@ -154,19 +154,19 @@ public class WebPosSearch { // search by last name if (UtilValidate.isNotEmpty(searchByPartyLastName)) { searchByPartyLastName = searchByPartyLastName.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("lastName"), EntityOperator.LIKE, - EntityFunction.UPPER("%" + searchByPartyLastName + "%"))); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("lastName"), EntityOperator.LIKE, + EntityFunction.upper("%" + searchByPartyLastName + "%"))); } // search by first name if (UtilValidate.isNotEmpty(searchByPartyFirstName)) { searchByPartyFirstName = searchByPartyFirstName.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("firstName"), EntityOperator.LIKE, - EntityFunction.UPPER("%" + searchByPartyFirstName + "%"))); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("firstName"), EntityOperator.LIKE, + EntityFunction.upper("%" + searchByPartyFirstName + "%"))); } // search by party identification if (UtilValidate.isNotEmpty(searchByPartyIdValue)) { searchByPartyIdValue = searchByPartyIdValue.toUpperCase().trim(); - andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("idValue"), EntityOperator.EQUALS, searchByPartyIdValue)); + andExprs.add(EntityCondition.makeCondition(EntityFunction.upperField("idValue"), EntityOperator.EQUALS, searchByPartyIdValue)); if (UtilValidate.isNotEmpty(partyIdentificationTypeId)) { andExprs.add(EntityCondition.makeCondition("partyIdentificationTypeId", EntityOperator.EQUALS, partyIdentificationTypeId)); }