You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/05/11 12:59:14 UTC

svn commit: r655299 - in /ofbiz/trunk: applications/accounting/webapp/accounting/WEB-INF/actions/admin/ specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/

Author: lektran
Date: Sun May 11 03:59:14 2008
New Revision: 655299

URL: http://svn.apache.org/viewvc?rev=655299&view=rev
Log:
Removed calls to deprecated findByLike GenericDelegator methods from all bsh files

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh?rev=655299&r1=655298&r2=655299&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh Sun May 11 03:59:14 2008
@@ -20,13 +20,14 @@
 import java.util.*;
 import java.lang.*;
 import org.ofbiz.entity.*;
+import org.ofbiz.entity.condition.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.base.util.UtilMisc;
 
 delegator = parameters.get("delegator");
 organizationPartyId = parameters.get("organizationPartyId");
 
-List invoiceItemTypes = delegator.findByLike("InvoiceItemType",UtilMisc.toMap("invoiceItemTypeId","INV_%"));
+List invoiceItemTypes = delegator.findList("InvoiceItemType", new EntityExpr("invoiceItemTypeId", EntityOperator.LIKE, "INV_%"), null, null, null, false);
 List allTypes = new LinkedList();
 i = invoiceItemTypes.iterator();
 while(i.hasNext()) {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh?rev=655299&r1=655298&r2=655299&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh Sun May 11 03:59:14 2008
@@ -20,13 +20,14 @@
 import java.util.*;
 import java.lang.*;
 import org.ofbiz.entity.*;
+import org.ofbiz.entity.condition.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.base.util.UtilMisc;
 
 delegator = parameters.get("delegator");
 organizationPartyId = parameters.get("organizationPartyId");
 
-List invoiceItemTypes = delegator.findByLike("InvoiceItemType",UtilMisc.toMap("invoiceItemTypeId","PINV_%"));
+List invoiceItemTypes = delegator.findList("InvoiceItemType", new EntityExpr("invoiceItemTypeId", EntityOperator.LIKE, "PINV_%"), null, null, null, false);
 List allTypes = new LinkedList();
 i = invoiceItemTypes.iterator();
 while(i.hasNext()) {

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh?rev=655299&r1=655298&r2=655299&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh Sun May 11 03:59:14 2008
@@ -21,6 +21,7 @@
 import java.util.*;
 import java.lang.*;
 import org.ofbiz.entity.*;
+import org.ofbiz.entity.condition.*;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.base.util.*;
 import javolution.util.FastMap;
@@ -46,9 +47,13 @@
                 if (timeEntry.getString("invoiceId") == null) {
                     timesheet = timeEntry.getRelatedOne("Timesheet");
                     // check the role of his part, if party is a provider
-                    if (!UtilValidate.isEmpty(EntityUtil.filterByDate(delegator.findByLike("WorkEffortPartyAssignment", 
-                        UtilMisc.toMap("workEffortId", timeEntry.getString("workEffortId"), 
-                            "partyId", timesheet.getString("partyId"), "roleTypeId", "PROVIDER_%"))))) {
+                    exprs = UtilMisc.toList(
+                                new EntityExpr("workEffortId", EntityOperator.EQUALS, timeEntry.getString("workEffortId")),
+                                new EntityExpr("partyId", EntityOperator.EQUALS, timeEntry.getString("partyId")),
+                                new EntityExpr("roleTypeId", EntityOperator.LIKE, "PROVIDER_%"));
+                    ecl = new EntityConditionList(exprs, EntityOperator.AND);
+                    providerRoles = EntityUtil.filterByDate(delegator.findList("WorkEffortPartyAssignment", ecl, null, null, null, false));
+                    if (!UtilValidate.isEmpty(providerRoles)) {
                         rates = EntityUtil.filterByDate(delegator.findByAnd("PartyRate", 
                             UtilMisc.toMap("partyId", timesheet.getString("partyId"), "rateTypeId", timeEntry.getString("rateTypeId"))));
                         if (UtilValidate.isEmpty(rates)) {