Author: doogie
Date: Tue May 29 04:21:13 2012
New Revision: 1343530
URL: http://svn.apache.org/viewvc?rev=1343530&view=rev
Log:
DEPRECATION: specialpurpose: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy
ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
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=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
(original)
+++
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
Tue May 29 04:21:13 2012
@@ -74,7 +74,7 @@ public class ProductsExportToEbay {
List<GenericValue> productsList = delegator.findList("Product",
EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult),
null, null, null, false);
if (UtilValidate.isNotEmpty(productsList)) {
for (GenericValue product : productsList) {
- GenericValue startPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(product.getRelatedByAnd("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MINIMUM_PRICE"))));
+ GenericValue startPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(product.getRelated("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MINIMUM_PRICE"), null, false)));
if (UtilValidate.isEmpty(startPriceValue)) {
String startPriceMissingMsg = "Unable to find a
starting price for auction of product with id (" +
product.getString("productId") + "), So Ignoring the export of this product to
eBay.";
productExportFailureMessageList.add(startPriceMissingMsg);
@@ -206,7 +206,7 @@ public class ProductsExportToEbay {
String startPrice = (String)context.get("startPrice");
String startPriceCurrencyUomId = null;
if (UtilValidate.isEmpty(startPrice)) {
- GenericValue startPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelatedByAnd("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MINIMUM_PRICE"))));
+ GenericValue startPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelated("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MINIMUM_PRICE"), null, false)));
if (UtilValidate.isNotEmpty(startPriceValue)) {
startPrice = startPriceValue.getString("price");
startPriceCurrencyUomId =
startPriceValue.getString("currencyUomId");
@@ -217,7 +217,7 @@ public class ProductsExportToEbay {
String buyItNowPrice = (String)context.get("buyItNowPrice");
String buyItNowCurrencyUomId = null;
if (UtilValidate.isEmpty(buyItNowPrice)) {
- GenericValue buyItNowPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelatedByAnd("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MAXIMUM_PRICE"))));
+ GenericValue buyItNowPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelated("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MAXIMUM_PRICE"), null, false)));
if (UtilValidate.isNotEmpty(buyItNowPriceValue)) {
buyItNowPrice = buyItNowPriceValue.getString("price");
buyItNowCurrencyUomId =
buyItNowPriceValue.getString("currencyUomId");
Modified:
ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java
Tue May 29 04:21:13 2012
@@ -248,7 +248,7 @@ public class ThirdPartyEvents {
private static GenericValue getPartyRelationship(GenericValue party,
String roleTypeTo) {
try {
- return
EntityUtil.getFirst(EntityUtil.filterByDate(party.getRelatedByAnd("FromPartyRelationship",
UtilMisc.toMap("roleTypeIdTo", roleTypeTo)), true));
+ return
EntityUtil.getFirst(EntityUtil.filterByDate(party.getRelated("FromPartyRelationship",
UtilMisc.toMap("roleTypeIdTo", roleTypeTo), null, false), true));
} catch (GenericEntityException gee) {
Debug.logWarning(gee, module);
}
Modified:
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
(original)
+++
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
Tue May 29 04:21:13 2012
@@ -101,7 +101,7 @@ void retrieveWorkEffortData() {
}
entry.actualHours = aHours;
// get party assignment data to be able to set the task to complete
- workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelatedByAnd("WorkEffortPartyAssignment",
["partyId" : partyId]));
+ workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelated("WorkEffortPartyAssignment",
["partyId" : partyId], null, false));
if (workEffortPartyAssigns) {
workEffortPartyAssign = workEffortPartyAssigns[0];
entry.fromDate =
workEffortPartyAssign.getTimestamp("fromDate");
Modified: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
(original)
+++ ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java Tue
May 29 04:21:13 2012
@@ -83,7 +83,7 @@ public class ScrumEvents {
//compare week and compare date
if ((timesheetDate.compareTo(weekStart) <= 0) &&
(realTimeDate.compareTo(nowStartDate) < 0)) {
//check time entry
- List<GenericValue> timeEntryList =
timesheetMap.getRelatedByAnd("TimeEntry", UtilMisc.toMap("partyId", partyId,
"timesheetId",timesheetId, "fromDate",realTimeDate));
+ List<GenericValue> timeEntryList =
timesheetMap.getRelated("TimeEntry", UtilMisc.toMap("partyId", partyId,
"timesheetId",timesheetId, "fromDate",realTimeDate), null, false);
//check EmplLeave
List<GenericValue> emplLeaveList =
delegator.findByAnd("EmplLeave", UtilMisc.toMap("partyId", partyId, "fromDate",
realTimeDate), null, true);
if (UtilValidate.isEmpty(timeEntryList) &&
UtilValidate.isEmpty(emplLeaveList)) {
Modified:
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy
(original)
+++
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy
Tue May 29 04:21:13 2012
@@ -123,7 +123,7 @@ void retrieveWorkEffortData() {
}
entry.actualHours = aHours;
// get party assignment data to be able to set the task to complete
- workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelatedByAnd("WorkEffortPartyAssignment",
["partyId" : partyId]));
+ workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelated("WorkEffortPartyAssignment",
["partyId" : partyId], null, false));
if (workEffortPartyAssigns) {
workEffortPartyAssign = workEffortPartyAssigns[0];
entry.fromDate =
workEffortPartyAssign.getTimestamp("fromDate");
Modified:
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy
(original)
+++
ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy
Tue May 29 04:21:13 2012
@@ -101,7 +101,7 @@ void retrieveWorkEffortData() {
}
entry.actualHours = aHours;
// get party assignment data to be able to set the task to complete
- workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelatedByAnd("WorkEffortPartyAssignment",
["partyId" : partyId]));
+ workEffortPartyAssigns =
EntityUtil.filterByDate(entryWorkEffort.getRelated("WorkEffortPartyAssignment",
["partyId" : partyId], null, false));
if (workEffortPartyAssigns) {
workEffortPartyAssign = workEffortPartyAssigns[0];
entry.fromDate =
workEffortPartyAssign.getTimestamp("fromDate");
Modified:
ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java?rev=1343530&r1=1343529&r2=1343530&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
(original)
+++
ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
Tue May 29 04:21:13 2012
@@ -272,7 +272,7 @@ public class WebPosTransaction {
List<GenericValue> fcp = null;
try {
- fcp = facility.getRelatedByAnd("FacilityContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", "SHIP_ORIG_LOCATION"));
+ fcp = facility.getRelated("FacilityContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", "SHIP_ORIG_LOCATION"), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}