Author: jonesde
Date: Wed May 28 00:24:25 2008 New Revision: 660844 URL: http://svn.apache.org/viewvc?rev=660844&view=rev Log: More cleanups of now deprecated constructors and what what Modified: ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/viewCalendar.bsh ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/runStarSchemaQuery.bsh ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListFilteredTasks.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh Modified: ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java (original) +++ ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java Wed May 28 00:24:25 2008 @@ -28,12 +28,13 @@ import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; -import org.ofbiz.entity.condition.EntityConditionList; -import org.ofbiz.entity.condition.EntityExpr; -import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.GenericDelegator; 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.product.product.ProductWorker; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; @@ -77,10 +78,10 @@ return ServiceUtil.returnError (UtilProperties.getMessage("AssetMaintUiLabels","AssetMaintLowPartInventoryError",UtilMisc.toMap("productId", productId , "quantity", Double.toString(atp)), locale)); } - EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList( - new EntityExpr("productId", EntityOperator.EQUALS, productId), - new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId), - new EntityExpr("availableToPromiseTotal", EntityOperator.GREATER_THAN, "0")), + EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList( + EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId), + EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId), + EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.GREATER_THAN, "0")), EntityOperator.AND); List inventoryItems = delegator.findByAnd("InventoryItem", ecl, null, null, null, false); //&& inventoryItems.size() > 0 Iterator itr = inventoryItems.iterator(); Modified: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/viewCalendar.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/viewCalendar.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/viewCalendar.bsh (original) +++ ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/viewCalendar.bsh Wed May 28 00:24:25 2008 @@ -81,11 +81,11 @@ globalContext.put("end", end); } -List entityExprList = UtilMisc.toList(new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"), - new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"), new EntityExpr("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_MAINTENANCE")); +List entityExprList = UtilMisc.toList(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"), + EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK"), EntityCondition.makeCondition("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_MAINTENANCE")); String fixedAssetId = parameters.get("fixedAssetId"); if (UtilValidate.isNotEmpty(fixedAssetId)) { - entityExprList.add(new EntityExpr("fixedAssetId", EntityOperator.EQUALS, fixedAssetId)); + entityExprList.add(EntityCondition.makeCondition("fixedAssetId", EntityOperator.EQUALS, fixedAssetId)); globalContext.put("fixedAssetId", fixedAssetId); globalContext.put("addlParam", "&fixedAssetId=" + fixedAssetId); } Modified: ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/runStarSchemaQuery.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/runStarSchemaQuery.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/runStarSchemaQuery.bsh (original) +++ ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/runStarSchemaQuery.bsh Wed May 28 00:24:25 2008 @@ -45,7 +45,7 @@ List records = FastList.newInstance(); //conditionList.add(...); -//condition = new EntityConditionList(conditionList, EntityOperator.AND); +//condition = EntityCondition.makeCondition(conditionList, EntityOperator.AND); orderByFields = null; Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original) +++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Wed May 28 00:24:25 2008 @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - *******************************************************************************/ + */ package org.ofbiz.ebay; import java.io.BufferedReader; @@ -42,7 +42,7 @@ import org.ofbiz.base.util.UtilXml; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.condition.EntityExpr; +import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.ServiceUtil; @@ -172,7 +172,7 @@ List selectResult = (List)context.get("selectResult"); // Get the list of products to be exported to eBay - List productsList = delegator.findList("Product", new EntityExpr("productId", EntityOperator.IN, selectResult), null, null, null, false); + List productsList = delegator.findList("Product", EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult), null, null, null, false); try { Document itemDocument = UtilXml.makeEmptyXmlDocument("AddItemRequest"); Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java (original) +++ ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java Wed May 28 00:24:25 2008 @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - *******************************************************************************/ + */ package org.ofbiz.googlebase; import java.io.BufferedReader; @@ -45,13 +45,12 @@ import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.condition.EntityExpr; +import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; - import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -349,7 +348,7 @@ return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToGoogle.invalidCountryCode", locale)); } // Get the list of products to be exported to Google Base - List productsList = delegator.findList("Product", new EntityExpr("productId", EntityOperator.IN, selectResult), null, null, null, false); + List productsList = delegator.findList("Product", EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult), null, null, null, false); // Get the tracking code if (UtilValidate.isEmpty(trackingCodeId) || "_NA_".equals(trackingCodeId)) { Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Wed May 28 00:24:25 2008 @@ -182,11 +182,11 @@ // only if looking for available inventory find the non-serialized QOH total if (isAvailable) { - EntityCondition condition = new EntityConditionList(UtilMisc.toList( - new EntityExpr("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, snapshotDate), - new EntityExpr("productId", EntityOperator.EQUALS, productId), - new EntityExpr("inventoryItemTypeId", EntityOperator.EQUALS, "NON_SERIAL_INV_ITEM"), - new EntityExpr("facilityId", EntityOperator.EQUALS, syncInventoryFacilityId)), EntityOperator.AND); + EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toList( + EntityCondition.makeCondition("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, snapshotDate), + EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId), + EntityCondition.makeCondition("inventoryItemTypeId", EntityOperator.EQUALS, "NON_SERIAL_INV_ITEM"), + EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, syncInventoryFacilityId)), EntityOperator.AND); List invItemAndDetails = delegator.findList("InventoryItemDetailForSum", condition, UtilMisc.toSet("quantityOnHandSum"), null, null, false); Iterator invItemAndDetailIter = invItemAndDetails.iterator(); while (invItemAndDetailIter.hasNext()) { @@ -196,13 +196,13 @@ } // now regardless of AVAILABLE or NOTAVAILABLE check serialized inventory, just use the corresponding statusId as set above - EntityCondition serInvCondition = new EntityConditionList(UtilMisc.toList( - new EntityExpr("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, snapshotDate), - new EntityExpr(new EntityExpr("statusEndDatetime", EntityOperator.GREATER_THAN, snapshotDate), EntityOperator.OR, new EntityExpr("statusEndDatetime", EntityOperator.EQUALS, null)), - new EntityExpr("productId", EntityOperator.EQUALS, productId), - new EntityExpr("statusId", EntityOperator.EQUALS, statusId), - new EntityExpr("inventoryItemTypeId", EntityOperator.EQUALS, "SERIALIZED_INV_ITEM"), - new EntityExpr("facilityId", EntityOperator.EQUALS, syncInventoryFacilityId)), EntityOperator.AND); + EntityCondition serInvCondition = EntityCondition.makeCondition(UtilMisc.toList( + EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, snapshotDate), + EntityCondition.makeCondition(EntityCondition.makeCondition("statusEndDatetime", EntityOperator.GREATER_THAN, snapshotDate), EntityOperator.OR, EntityCondition.makeCondition("statusEndDatetime", EntityOperator.EQUALS, null)), + EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId), + EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId), + EntityCondition.makeCondition("inventoryItemTypeId", EntityOperator.EQUALS, "SERIALIZED_INV_ITEM"), + EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, syncInventoryFacilityId)), EntityOperator.AND); long invItemQuantCount = delegator.findCountByCondition("InventoryItemStatusForCount", serInvCondition, null, null); quantityOnHandTotal += invItemQuantCount; @@ -921,8 +921,8 @@ Set productIdSet = ProductWorker.getRefurbishedProductIdSet(productId, delegator); productIdSet.add(productId); - EntityCondition bySerialNumberCondition = new EntityExpr(new EntityExpr("serialNumber", EntityOperator.EQUALS, serialNum), - EntityOperator.AND, new EntityExpr("productId", EntityOperator.IN, productIdSet)); + EntityCondition bySerialNumberCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("serialNumber", EntityOperator.EQUALS, serialNum), + EntityOperator.AND, EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet)); List inventoryItemsBySerialNumber = delegator.findList("InventoryItem", bySerialNumberCondition, null, null, null, false); if (OagisServices.requireSerialNumberExist != null) { @@ -1393,8 +1393,8 @@ Set productIdSet = ProductWorker.getRefurbishedProductIdSet(productId, delegator); productIdSet.add(productId); - EntityCondition bySerialNumberCondition = new EntityExpr(new EntityExpr("serialNumber", EntityOperator.EQUALS, serialNum), - EntityOperator.AND, new EntityExpr("productId", EntityOperator.IN, productIdSet)); + EntityCondition bySerialNumberCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("serialNumber", EntityOperator.EQUALS, serialNum), + EntityOperator.AND, EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet)); List inventoryItemsBySerialNumber = delegator.findList("InventoryItem", bySerialNumberCondition, null, null, null, false); // this is a status update, so referenced serial number MUST already exist Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Wed May 28 00:24:25 2008 @@ -463,8 +463,8 @@ Set productIdSet = ProductWorker.getRefurbishedProductIdSet(productId, delegator); productIdSet.add(productId); - EntityCondition bySerialNumberCondition = new EntityExpr(new EntityExpr("serialNumber", EntityOperator.EQUALS, serialNumber), - EntityOperator.AND, new EntityExpr("productId", EntityOperator.IN, productIdSet)); + EntityCondition bySerialNumberCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("serialNumber", EntityOperator.EQUALS, serialNumber), + EntityOperator.AND, EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet)); List inventoryItemsBySerialNumber = delegator.findList("InventoryItem", bySerialNumberCondition, null, null, null, false); if (OagisServices.requireSerialNumberExist.booleanValue()) { if (inventoryItemsBySerialNumber.size() == 0) { @@ -807,9 +807,9 @@ if (Debug.infoOn()) Debug.logInfo("Saved OagisMessageInfo for oagisSendProcessShipment message for orderId [" + orderId + "]", module); // check to see if there is already a Shipment for this order - EntityCondition findShipmentCondition = new EntityConditionList(UtilMisc.toList( - new EntityExpr("primaryOrderId", EntityOperator.EQUALS, orderId), - new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_CANCELLED") + EntityCondition findShipmentCondition = EntityCondition.makeCondition(UtilMisc.toList( + EntityCondition.makeCondition("primaryOrderId", EntityOperator.EQUALS, orderId), + EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_CANCELLED") ), EntityOperator.AND); List shipmentList = delegator.findList("Shipment", findShipmentCondition, null, null, null, false); GenericValue shipment = EntityUtil.getFirst(shipmentList); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java Wed May 28 00:24:25 2008 @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,45 +15,45 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - *******************************************************************************/ + */ package org.ofbiz.pos.event; -import java.util.List; -import java.util.HashMap; -import java.util.Map; import java.sql.Timestamp; -import java.util.Locale; import java.text.DecimalFormat; import java.text.ParseException; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import net.xoetrope.xui.XProjectManager; -import org.ofbiz.base.util.cache.UtilCache; import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.pos.device.DeviceLoader; -import org.ofbiz.pos.device.impl.Receipt; -import org.ofbiz.pos.screen.PosScreen; -import org.ofbiz.pos.screen.PaidInOut; -import org.ofbiz.pos.PosTransaction; -import org.ofbiz.pos.adaptor.SyncCallbackAdaptor; -import org.ofbiz.pos.component.Input; -import org.ofbiz.pos.component.Output; +import org.ofbiz.base.util.cache.UtilCache; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.util.EntityListIterator; -import org.ofbiz.entity.condition.EntityExpr; -import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityConditionList; -import org.ofbiz.service.LocalDispatcher; +import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.guiapp.xui.XuiSession; +import org.ofbiz.pos.PosTransaction; +import org.ofbiz.pos.adaptor.SyncCallbackAdaptor; +import org.ofbiz.pos.component.Input; +import org.ofbiz.pos.component.Output; +import org.ofbiz.pos.device.DeviceLoader; +import org.ofbiz.pos.device.impl.Receipt; +import org.ofbiz.pos.screen.PaidInOut; +import org.ofbiz.pos.screen.PosScreen; import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; -import org.ofbiz.guiapp.xui.XuiSession; -import org.ofbiz.base.util.UtilProperties; public class ManagerEvents { @@ -475,12 +475,12 @@ double total = 0.00; GenericDelegator delegator = pos.getSession().getDelegator(); - List exprs = UtilMisc.toList(new EntityExpr("originFacilityId", EntityOperator.EQUALS, trans.getFacilityId()), - new EntityExpr("terminalId", EntityOperator.EQUALS, trans.getTerminalId())); + List exprs = UtilMisc.toList(EntityCondition.makeCondition("originFacilityId", EntityOperator.EQUALS, trans.getFacilityId()), + EntityCondition.makeCondition("terminalId", EntityOperator.EQUALS, trans.getTerminalId())); EntityListIterator eli = null; try { - eli = delegator.find("OrderHeaderAndPaymentPref", new EntityConditionList(exprs, EntityOperator.AND), null, null, null, null); + eli = delegator.find("OrderHeaderAndPaymentPref", EntityCondition.makeCondition(exprs, EntityOperator.AND), null, null, null, null); } catch (GenericEntityException e) { Debug.logError(e, module); } Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh Wed May 28 00:24:25 2008 @@ -47,25 +47,25 @@ entryCondition = new LinkedList(); if (UtilValidate.isNotEmpty(fromDate)) { if (fromDate.toString().length() == 10) - entryCondition.add(new EntityExpr("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); + entryCondition.add(EntityCondition.makeCondition("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); else - entryCondition.add(new EntityExpr("createdDate", EntityOperator.GREATER_THAN, fromDate)); + entryCondition.add(EntityCondition.makeCondition("createdDate", EntityOperator.GREATER_THAN, fromDate)); } if (UtilValidate.isNotEmpty(workEffortName)) { - entryCondition.add(new EntityExpr("workEffortName", EntityOperator.LIKE, "%" + workEffortName + "%")); + entryCondition.add(EntityCondition.makeCondition("workEffortName", EntityOperator.LIKE, "%" + workEffortName + "%")); } // get subprojects for a project if (UtilValidate.isNotEmpty(projectId)) { - entryCondition.add(new EntityExpr("workEffortParentId", EntityOperator.EQUALS, projectId)); + entryCondition.add(EntityCondition.makeCondition("workEffortParentId", EntityOperator.EQUALS, projectId)); } // create project list. exprList = UtilMisc.toList( - new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "PROJECT")); + EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "PROJECT")); if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); -condition = new EntityConditionList(exprList, EntityOperator.AND); +condition = EntityCondition.makeCondition(exprList, EntityOperator.AND); projectIds = delegator.findList("WorkEffort", condition, UtilMisc.toSet("workEffortId", "workEffortName"), UtilMisc.toList("workEffortName DESC"), null, false); // retrieve all project data with the service Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListFilteredTasks.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListFilteredTasks.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListFilteredTasks.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListFilteredTasks.bsh Wed May 28 00:24:25 2008 @@ -108,10 +108,10 @@ }else { if(workEffortTypeId.equals("TASK")) { if ( !(UtilValidate.isEmpty(fromDate) || UtilValidate.isEmpty(thruDate))) { - conditions = UtilMisc.toList(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK")); - conditions.add(new EntityExpr("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); - conditions.add(new EntityExpr("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); - allConditions = new EntityConditionList( conditions, EntityOperator.AND ); + conditions = UtilMisc.toList(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK")); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); + allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND ); orderBy = UtilMisc.toList("createdStamp DESC"); listProjects = delegator.findList("WorkEffort", allConditions, null, orderBy, null, true); List projects = new LinkedList(); Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh Wed May 28 00:24:25 2008 @@ -40,14 +40,14 @@ } if(workEffortTypeId.equals("PROJECT")) { if ( !UtilValidate.isEmpty(fromDate) || !UtilValidate.isEmpty(thruDate)) { - conditions = UtilMisc.toList(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "PROJECT")); + conditions = UtilMisc.toList(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "PROJECT")); if (!UtilValidate.isEmpty(fromDate)) { - conditions.add(new EntityExpr("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); } if (!UtilValidate.isEmpty(thruDate)) { - conditions.add(new EntityExpr("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); } - allConditions = new EntityConditionList(conditions, EntityOperator.AND); + allConditions = EntityCondition.makeCondition(conditions, EntityOperator.AND); orderBy = UtilMisc.toList("createdStamp DESC"); listProjects = delegator.findList("WorkEffort", allConditions, null, orderBy, null, true); List projects = new LinkedList(); @@ -91,15 +91,15 @@ } else { if ( !UtilValidate.isEmpty(fromDate) || !UtilValidate.isEmpty(thruDate)) { - conditions = UtilMisc.toList(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK")); + conditions = UtilMisc.toList(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK")); if (!UtilValidate.isEmpty(fromDate)) { - conditions.add(new EntityExpr("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate )); } if (!UtilValidate.isEmpty(thruDate)) { - conditions.add(new EntityExpr("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate )); } - allConditions = new EntityConditionList( conditions, EntityOperator.AND ); + allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND ); orderBy = UtilMisc.toList("createdStamp DESC"); tasks = delegator.findList("WorkEffort", allConditions, null, orderBy, null, true); List unAssignedTasks = new LinkedList(); Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListTimeSheetByDateRange.bsh Wed May 28 00:24:25 2008 @@ -37,9 +37,9 @@ List timeSheetList = new LinkedList(); if ( !(UtilValidate.isEmpty(fromDate) || UtilValidate.isEmpty(thruDate))) { List conditions = new LinkedList(); - conditions.add(new EntityExpr("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); - conditions.add(new EntityExpr("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)); - allConditions = new EntityConditionList(conditions, EntityOperator.AND); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); + conditions.add(EntityCondition.makeCondition("createdStamp", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)); + allConditions = EntityCondition.makeCondition(conditions, EntityOperator.AND); orderBy = UtilMisc.toList("createdStamp DESC"); timeSheetList = delegator.findList("Timesheet", allConditions, null, orderBy, null, true); context.put("timeSheetList", timeSheetList); 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=660844&r1=660843&r2=660844&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 Wed May 28 00:24:25 2008 @@ -48,10 +48,10 @@ timesheet = timeEntry.getRelatedOne("Timesheet"); // check the role of his part, if party is a 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); + EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, timeEntry.getString("workEffortId")), + EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, timeEntry.getString("partyId")), + EntityCondition.makeCondition("roleTypeId", EntityOperator.LIKE, "PROVIDER_%")); + ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND); providerRoles = EntityUtil.filterByDate(delegator.findList("WorkEffortPartyAssignment", ecl, null, null, null, false)); if (!UtilValidate.isEmpty(providerRoles)) { rates = EntityUtil.filterByDate(delegator.findByAnd("PartyRate", Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh?rev=660844&r1=660843&r2=660844&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh Wed May 28 00:24:25 2008 @@ -45,34 +45,34 @@ // entry conditions entryCondition = new LinkedList(); if (UtilValidate.isNotEmpty(fromDate)) { - entryCondition.add(new EntityExpr("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); + entryCondition.add(EntityCondition.makeCondition("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); } if (UtilValidate.isNotEmpty(workEffortName)) { - entryCondition.add(new EntityExpr("workEffortName", EntityOperator.LIKE, "%" + workEffortName + "%")); + entryCondition.add(EntityCondition.makeCondition("workEffortName", EntityOperator.LIKE, "%" + workEffortName + "%")); } // create workEffort list for tasks with no phase. exprList = UtilMisc.toList( - new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"), - new EntityExpr("workEffortParentId", EntityOperator.EQUALS, null), - new EntityExpr("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); + EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK"), + EntityCondition.makeCondition("workEffortParentId", EntityOperator.EQUALS, null), + EntityCondition.makeCondition("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); -condition = new EntityConditionList(exprList, EntityOperator.AND); +condition = EntityCondition.makeCondition(exprList, EntityOperator.AND); tasks = delegator.findList("WorkEffort", condition, null, null, null, false); // create workEffort list in a project exprList = UtilMisc.toList( - new EntityExpr("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); + EntityCondition.makeCondition("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); -condition = new EntityConditionList(exprList, EntityOperator.AND); +condition = EntityCondition.makeCondition(exprList, EntityOperator.AND); tasks.addAll(delegator.findList("ProjectAndPhaseAndTask", condition, null, null, null, false)); // add the timeEntry conditions exprList = UtilMisc.toList( - new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"), - new EntityExpr("createdByUserLogin", EntityOperator.NOT_EQUAL, userLogin.getString("userLoginId"))); //already have these + EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK"), + EntityCondition.makeCondition("createdByUserLogin", EntityOperator.NOT_EQUAL, userLogin.getString("userLoginId"))); //already have these if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); -condition = new EntityConditionList(exprList, EntityOperator.AND); +condition = EntityCondition.makeCondition(exprList, EntityOperator.AND); tasks.addAll(delegator.findList("WorkEffortAndTimeEntry", condition, null, null, null, false)); // add fields for planned and actual hours. |
Free forum by Nabble | Edit this page |