Author: doogie
Date: Mon May 14 21:02:12 2012
New Revision: 1338412
URL: http://svn.apache.org/viewvc?rev=1338412&view=rev
Log:
DEPRECATION: applications/workeffort: findByAnd variants replaced with
findByAnd that takes a boolean useCache parameter.
Modified:
ofbiz/trunk/applications/workeffort/script/isCalOwner.groovy
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
Modified: ofbiz/trunk/applications/workeffort/script/isCalOwner.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/isCalOwner.groovy?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/script/isCalOwner.groovy (original)
+++ ofbiz/trunk/applications/workeffort/script/isCalOwner.groovy Mon May 14
21:02:12 2012
@@ -21,7 +21,7 @@ import java.util.*;
import org.ofbiz.entity.util.*;
boolean isCalOwner = false;
-List partyAssignments =
EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment",
["workEffortId" : parameters.workEffortId, "partyId" :
parameters.userLogin.partyId]));
+List partyAssignments =
EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment",
["workEffortId" : parameters.workEffortId, "partyId" :
parameters.userLogin.partyId], null, false));
for (partyAssign in partyAssignments) {
if ("CAL_OWNER".equals(partyAssign.roleTypeId) ||
"CAL_DELEGATE".equals(partyAssign.roleTypeId)) {
isCalOwner = true;
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
Mon May 14 21:02:12 2012
@@ -313,7 +313,7 @@ public class WorkEffortContentWrapper im
}
public static List<String> getWorkEffortContentTextList(GenericValue
workEffort, String workEffortContentTypeId, Locale locale, String mimeTypeId,
Delegator delegator, LocalDispatcher dispatcher) throws GeneralException,
IOException {
- List<GenericValue> partyContentList =
delegator.findByAndCache("WorkEffortContent", UtilMisc.toMap("workEffortId",
workEffort.getString("partyId"), "workEffortContentTypeId",
workEffortContentTypeId), UtilMisc.toList("-fromDate"));
+ List<GenericValue> partyContentList =
delegator.findByAnd("WorkEffortContent", UtilMisc.toMap("workEffortId",
workEffort.getString("partyId"), "workEffortContentTypeId",
workEffortContentTypeId), UtilMisc.toList("-fromDate"), true);
partyContentList = EntityUtil.filterByDate(partyContentList);
List<String> contentList = FastList.newInstance();
@@ -346,7 +346,7 @@ public class WorkEffortContentWrapper im
List<GenericValue> workEffortContentList = null;
try {
- workEffortContentList =
delegator.findByAndCache("WorkEffortContent", UtilMisc.toMap("workEffortId",
workEffortId, "workEffortContentTypeId", workEffortContentTypeId),
UtilMisc.toList("-fromDate"));
+ workEffortContentList =
delegator.findByAnd("WorkEffortContent", UtilMisc.toMap("workEffortId",
workEffortId, "workEffortContentTypeId", workEffortContentTypeId),
UtilMisc.toList("-fromDate"), true);
} catch (GeneralException e) {
Debug.logError(e, module);
}
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
Mon May 14 21:02:12 2012
@@ -739,7 +739,7 @@ public class ICalConverter {
if (workEffortId == null) {
Property uid = component.getProperty(Uid.UID);
if (uid != null) {
- GenericValue workEffort =
EntityUtil.getFirst(delegator.findByAnd("WorkEffort",
UtilMisc.toMap("universalId", uid.getValue())));
+ GenericValue workEffort =
EntityUtil.getFirst(delegator.findByAnd("WorkEffort",
UtilMisc.toMap("universalId", uid.getValue()), null, false));
if (workEffort != null) {
workEffortId =
workEffort.getString("workEffortId");
}
@@ -806,7 +806,7 @@ public class ICalConverter {
Delegator delegator = (Delegator) context.get("delegator");
List<GenericValue> assignments = null;
try {
- assignments =
EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment",
serviceMap));
+ assignments =
EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment",
serviceMap, null, false));
if (assignments.size() == 0) {
serviceMap.put("statusId", "PRTYASGN_OFFERED");
serviceMap.put("fromDate", new
Timestamp(System.currentTimeMillis()));
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
Mon May 14 21:02:12 2012
@@ -68,7 +68,7 @@ public class WorkEffortKeywordIndex {
addWeightedKeywordSourceString(workEffort, "currentStatusId", strings);
if (!"0".equals(UtilProperties.getPropertyValue("workeffortsearch",
"index.weight.WorkEffortNoteAndData.noteInfo", "1"))) {
- List<GenericValue> workEffortNotes =
delegator.findByAnd("WorkEffortNoteAndData", UtilMisc.toMap("workEffortId",
workEffortId));
+ List<GenericValue> workEffortNotes =
delegator.findByAnd("WorkEffortNoteAndData", UtilMisc.toMap("workEffortId",
workEffortId), null, false);
for (GenericValue workEffortNote : workEffortNotes) {
addWeightedKeywordSourceString(workEffortNote, "noteInfo",
strings);
}
@@ -76,7 +76,7 @@ public class WorkEffortKeywordIndex {
//WorkEffortAttribute
if (!"0".equals(UtilProperties.getPropertyValue("workeffortsearch",
"index.weight.WorkEffortAttribute.attrName", "1")) ||
!"0".equals(UtilProperties.getPropertyValue("workeffortsearch",
"index.weight.WorkEffortAttribute.attrValue", "1"))) {
- List<GenericValue> workEffortAttributes =
delegator.findByAnd("WorkEffortAttribute", UtilMisc.toMap("workEffortId",
workEffortId));
+ List<GenericValue> workEffortAttributes =
delegator.findByAnd("WorkEffortAttribute", UtilMisc.toMap("workEffortId",
workEffortId), null, false);
for (GenericValue workEffortAttribute : workEffortAttributes) {
addWeightedKeywordSourceString(workEffortAttribute,
"attrName", strings);
addWeightedKeywordSourceString(workEffortAttribute,
"attrValue", strings);
@@ -92,7 +92,7 @@ public class WorkEffortKeywordIndex {
Debug.logWarning("Could not parse weight number: " +
e.toString(), module);
}
- List<GenericValue> workEffortContentAndInfos =
delegator.findByAnd("WorkEffortContentAndInfo", UtilMisc.toMap("workEffortId",
workEffortId, "workEffortContentTypeId", workEffortContentTypeId), null);
+ List<GenericValue> workEffortContentAndInfos =
delegator.findByAnd("WorkEffortContentAndInfo", UtilMisc.toMap("workEffortId",
workEffortId, "workEffortContentTypeId", workEffortContentTypeId), null, false);
for (GenericValue workEffortContentAndInfo:
workEffortContentAndInfos) {
addWeightedDataResourceString(workEffortContentAndInfo,
weight, strings, delegator, workEffort);
List<GenericValue> alternateViews =
workEffortContentAndInfo.getRelated("ContentAssocDataResourceViewTo",
UtilMisc.toMap("caContentAssocTypeId", "ALTERNATE_LOCALE"),
UtilMisc.toList("-caFromDate"));
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
Mon May 14 21:02:12 2012
@@ -102,7 +102,7 @@ public class WorkEffortSearch {
// now find all sub-categories, filtered by effective dates, and call
this routine for them
try {
// Find WorkEffortAssoc, workEffortAssocTypeId=WORK_EFF_BREAKDOWN
- List<GenericValue> workEffortAssocList =
delegator.findByAndCache("WorkEffortAssoc", UtilMisc.toMap("workEffortIdFrom",
workEffortId, "workEffortAssocTypeId", "WORK_EFF_BREAKDOWN"));
+ List<GenericValue> workEffortAssocList =
delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdFrom",
workEffortId, "workEffortAssocTypeId", "WORK_EFF_BREAKDOWN"), null, true);
for (GenericValue workEffortAssoc: workEffortAssocList) {
String subWorkEffortId =
workEffortAssoc.getString("workEffortIdTo");
if (workEffortIdSet.contains(subWorkEffortId)) {
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
Mon May 14 21:02:12 2012
@@ -336,7 +336,7 @@ public class WorkEffortServices {
// get a list of workEffortPartyAssignments, if empty then this
user CANNOT view the event, unless they have permission to view all
if (userLogin != null && userLogin.get("partyId") != null &&
workEffortId != null) {
try {
- workEffortPartyAssignments =
delegator.findByAnd("WorkEffortPartyAssignment", UtilMisc.toMap("workEffortId",
workEffortId, "partyId", userLogin.get("partyId")));
+ workEffortPartyAssignments =
delegator.findByAnd("WorkEffortPartyAssignment", UtilMisc.toMap("workEffortId",
workEffortId, "partyId", userLogin.get("partyId")), null, false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -795,9 +795,9 @@ public class WorkEffortServices {
for (GenericValue incomingProductionRun: incomingProductionRuns) {
double producedQtyTot = 0.0;
if
(incomingProductionRun.getString("currentStatusId").equals("PRUN_COMPLETED")) {
- List<GenericValue> inventoryItems =
delegator.findByAnd("WorkEffortAndInventoryProduced",
UtilMisc.toMap("productId", productId, "workEffortId",
incomingProductionRun.getString("workEffortId")));
+ List<GenericValue> inventoryItems =
delegator.findByAnd("WorkEffortAndInventoryProduced",
UtilMisc.toMap("productId", productId, "workEffortId",
incomingProductionRun.getString("workEffortId")), null, false);
for (GenericValue inventoryItem: inventoryItems) {
- GenericValue inventoryItemDetail =
EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail",
UtilMisc.toMap("inventoryItemId", inventoryItem.getString("inventoryItemId")),
UtilMisc.toList("inventoryItemDetailSeqId")));
+ GenericValue inventoryItemDetail =
EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail",
UtilMisc.toMap("inventoryItemId", inventoryItem.getString("inventoryItemId")),
UtilMisc.toList("inventoryItemDetailSeqId"), false));
if (inventoryItemDetail != null &&
inventoryItemDetail.get("quantityOnHandDiff") != null) {
Double inventoryItemQty =
inventoryItemDetail.getDouble("quantityOnHandDiff");
producedQtyTot = producedQtyTot +
inventoryItemQty.doubleValue();
Modified:
ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl?rev=1338412&r1=1338411&r2=1338412&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
(original)
+++
ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/calendarEventContent.ftl
Mon May 14 21:02:12 2012
@@ -25,7 +25,7 @@ under the License.
<#if workOrderItemFulfillments?has_content>
<#list workOrderItemFulfillments as workOrderItemFulfillment>
<br/>${uiLabelMap.OrderOrderId}: <a
href="/ordermgr/control/orderview?orderId=${workOrderItemFulfillment.orderId}"
class="event">${workOrderItemFulfillment.orderId} /
${workOrderItemFulfillment.orderItemSeqId}</a>
- <#assign orderItemAndShipGroupAssocs =
delegator.findByAnd("OrderHeaderItemAndShipGroup", {"orderId",
workOrderItemFulfillment.orderId, "orderItemSeqId",
workOrderItemFulfillment.orderItemSeqId})?if_exists/>
+ <#assign orderItemAndShipGroupAssocs =
delegator.findByAnd("OrderHeaderItemAndShipGroup", {"orderId",
workOrderItemFulfillment.orderId, "orderItemSeqId",
workOrderItemFulfillment.orderItemSeqId}, null, false)?if_exists/>
<#list orderItemAndShipGroupAssocs as orderItemAndShipGroupAssoc>
<#if orderItemAndShipGroupAssoc.shipByDate?has_content>
${uiLabelMap.OrderShipBeforeDate}:
${orderItemAndShipGroupAssoc.shipByDate}
@@ -41,7 +41,7 @@ under the License.
<#if parentWorkOrderItemFulfillments?has_content>
<#list parentWorkOrderItemFulfillments as parentWorkOrderItemFulfillment>
<br/>${uiLabelMap.OrderOrderId}: <a
href="/ordermgr/control/orderview?orderId=${parentWorkOrderItemFulfillment.orderId}"
class="event">${parentWorkOrderItemFulfillment.orderId} /
${parentWorkOrderItemFulfillment.orderItemSeqId}</a>
- <#assign orderItemAndShipGroupAssocs =
delegator.findByAnd("OrderHeaderItemAndShipGroup", {"orderId",
parentWorkOrderItemFulfillment.orderId, "orderItemSeqId",
parentWorkOrderItemFulfillment.orderItemSeqId})?if_exists/>
+ <#assign orderItemAndShipGroupAssocs =
delegator.findByAnd("OrderHeaderItemAndShipGroup", {"orderId",
parentWorkOrderItemFulfillment.orderId, "orderItemSeqId",
parentWorkOrderItemFulfillment.orderItemSeqId}, null, false)?if_exists/>
<#list orderItemAndShipGroupAssocs as orderItemAndShipGroupAssoc>
<#if orderItemAndShipGroupAssoc.shipByDate?has_content>
${uiLabelMap.OrderShipBeforeDate}:
${orderItemAndShipGroupAssoc.shipByDate}