Author: doogie
Date: Tue May 29 04:20:58 2012
New Revision: 1343528
URL: http://svn.apache.org/viewvc?rev=1343528&view=rev
Log:
DEPRECATION: applications: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
(original)
+++
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
Tue May 29 04:20:58 2012
@@ -333,7 +333,7 @@ public class InvoiceServices {
// for purchase orders, the pay to address is the
BILLING_LOCATION of the vendor
GenericValue billFromVendor =
orh.getPartyFromRole("BILL_FROM_VENDOR");
if (billFromVendor != null) {
- List<GenericValue> billingContactMechs =
billFromVendor.getRelatedOne("Party",
false).getRelatedByAnd("PartyContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION"));
+ List<GenericValue> billingContactMechs =
billFromVendor.getRelatedOne("Party",
false).getRelated("PartyContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION"), null, false);
if (UtilValidate.isNotEmpty(billingContactMechs)) {
payToAddress =
EntityUtil.getFirst(billingContactMechs);
}
@@ -2056,7 +2056,7 @@ public class InvoiceServices {
}
// loop through return-wide adjustments and create invoice items
for each
- List<GenericValue> adjustments =
returnHeader.getRelatedByAndCache("ReturnAdjustment",
UtilMisc.toMap("returnItemSeqId", "_NA_"));
+ List<GenericValue> adjustments =
returnHeader.getRelated("ReturnAdjustment", UtilMisc.toMap("returnItemSeqId",
"_NA_"), null, true);
for (GenericValue adjustment : adjustments) {
// determine invoice item type from the return item type
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy
Tue May 29 04:20:58 2012
@@ -37,7 +37,7 @@ invoiceItemTypes.each { invoiceItemType
remove = " ";
glAccounts = null;
glAccount = null;
- invoiceItemTypeOrgs =
invoiceItemType.getRelatedByAnd("InvoiceItemTypeGlAccount",
[organizationPartyId : organizationPartyId]);
+ invoiceItemTypeOrgs =
invoiceItemType.getRelated("InvoiceItemTypeGlAccount", [organizationPartyId :
organizationPartyId], null, false);
overrideGlAccountId = " ";
if (invoiceItemTypeOrgs) {
invoiceItemTypeOrg = invoiceItemTypeOrgs[0];
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy
Tue May 29 04:20:58 2012
@@ -67,7 +67,7 @@ if (invoice) {
invoice.invoiceMessage = " converted from original with a rate of: " +
conversionRate.setScale(8, rounding);
}
- invoiceItems = invoice.getRelatedOrderBy("InvoiceItem",
["invoiceItemSeqId"]);
+ invoiceItems = invoice.getRelated("InvoiceItem", null,
["invoiceItemSeqId"], false);
invoiceItemsConv = FastList.newInstance();
vatTaxesByType = FastMap.newInstance();
invoiceItems.each { invoiceItem ->
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/PrintInvoices.groovy
Tue May 29 04:20:58 2012
@@ -41,7 +41,7 @@ invoiceIds.each { invoiceId ->
invoice.invoiceMessage = " converted from original with a rate of:
" + conversionRate.setScale(8, rounding);
}
- invoiceItems = invoice.getRelatedOrderBy("InvoiceItem",
["invoiceItemSeqId"]);
+ invoiceItems = invoice.getRelated("InvoiceItem", null,
["invoiceItemSeqId"], false);
invoiceItemsConv = [];
invoiceItems.each { invoiceItem ->
if (invoiceItem.amount) {
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
(original)
+++
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
Tue May 29 04:20:58 2012
@@ -402,7 +402,7 @@ public class ContentManagementWorker {
map.put("description", description);
for(String [] publishPointArray : permittedPublishPointList) {
String publishPointId = publishPointArray[0];
- List<GenericValue> contentAssocList =
content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentId",
publishPointId));
+ List<GenericValue> contentAssocList =
content.getRelated("ToContentAssoc", UtilMisc.toMap("contentId",
publishPointId), null, false);
List<GenericValue> filteredList =
EntityUtil.filterByDate(contentAssocList);
if (filteredList.size() > 0) {
map.put(publishPointId, "Y");
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
(original)
+++
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
Tue May 29 04:20:58 2012
@@ -160,7 +160,7 @@ public class ContentWorker implements or
alternateViews = EntityUtil.filterByDate(alternateViews,
UtilDateTime.nowTimestamp(), "caFromDate", "caThruDate", true);
for(GenericValue thisView : alternateViews) {
- GenericValue altContentRole =
EntityUtil.getFirst(EntityUtil.filterByDate(thisView.getRelatedByAndCache("ContentRole",
UtilMisc.toMap("partyId", partyId, "roleTypeId", roleTypeId))));
+ GenericValue altContentRole =
EntityUtil.getFirst(EntityUtil.filterByDate(thisView.getRelated("ContentRole",
UtilMisc.toMap("partyId", partyId, "roleTypeId", roleTypeId), null, true)));
GenericValue altContent = null;
if (UtilValidate.isNotEmpty(altContentRole)) {
altContent = altContentRole.getRelatedOne("Content", true);
@@ -433,13 +433,13 @@ public class ContentWorker implements or
}
contentId = (String) content.get("contentId");
contentTypeId = (String) content.get("contentTypeId");
- List<GenericValue> topicList =
content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId",
"TOPIC"));
+ List<GenericValue> topicList =
content.getRelated("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId",
"TOPIC"), null, false);
List<String> topics = FastList.newInstance();
for (int i = 0; i < topicList.size(); i++) {
GenericValue assoc = topicList.get(i);
topics.add(assoc.getString("contentId"));
}
- List<GenericValue> keywordList =
content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId",
"KEYWORD"));
+ List<GenericValue> keywordList =
content.getRelated("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId",
"KEYWORD"), null, false);
List<String> keywords = FastList.newInstance();
for (int i = 0; i < keywordList.size(); i++) {
GenericValue assoc = keywordList.get(i);
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java
Tue May 29 04:20:58 2012
@@ -125,7 +125,7 @@ public class BOMTree {
// the bill of materials of its virtual product (if the current
// product is variant).
if (!hasBom(product, inDate)) {
- List<GenericValue> virtualProducts =
product.getRelatedByAnd("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> virtualProducts =
product.getRelated("AssocProductAssoc", UtilMisc.toMap("productAssocTypeId",
"PRODUCT_VARIANT"), null, false);
virtualProducts = EntityUtil.filterByDate(virtualProducts, inDate);
GenericValue virtualProduct = EntityUtil.getFirst(virtualProducts);
if (virtualProduct != null) {
@@ -174,7 +174,7 @@ public class BOMTree {
}
private boolean hasBom(GenericValue product, Date inDate) throws
GenericEntityException {
- List<GenericValue> children =
product.getRelatedByAnd("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", bomTypeId));
+ List<GenericValue> children = product.getRelated("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", bomTypeId), null, false);
children = EntityUtil.filterByDate(children, inDate);
return UtilValidate.isNotEmpty(children);
}
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Tue May 29 04:20:58 2012
@@ -1106,10 +1106,10 @@ public class ProductionRunServices {
fixedAsset = routingTask.getRelatedOne("FixedAsset", false);
}
if (UtilValidate.isNotEmpty(fixedAsset)) {
- List<GenericValue> setupCosts =
fixedAsset.getRelatedByAnd("FixedAssetStdCost",
- UtilMisc.toMap("fixedAssetStdCostTypeId",
"SETUP_COST"));
+ List<GenericValue> setupCosts =
fixedAsset.getRelated("FixedAssetStdCost",
+ UtilMisc.toMap("fixedAssetStdCostTypeId",
"SETUP_COST"), null, false);
GenericValue setupCost =
EntityUtil.getFirst(EntityUtil.filterByDate(setupCosts));
- List<GenericValue> usageCosts =
fixedAsset.getRelatedByAnd("FixedAssetStdCost",
UtilMisc.toMap("fixedAssetStdCostTypeId", "USAGE_COST"));
+ List<GenericValue> usageCosts =
fixedAsset.getRelated("FixedAssetStdCost",
UtilMisc.toMap("fixedAssetStdCostTypeId", "USAGE_COST"), null, false);
GenericValue usageCost =
EntityUtil.getFirst(EntityUtil.filterByDate(usageCosts));
if (UtilValidate.isNotEmpty(setupCost) ||
UtilValidate.isNotEmpty(usageCost)) {
String currencyUomId = (setupCost != null?
setupCost.getString("amountUomId"): usageCost.getString("amountUomId"));
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
Tue May 29 04:20:58 2012
@@ -681,7 +681,7 @@ public class MrpServices {
// It's a new product, so it's necessary to read the
MrpQoh
try {
product =
inventoryEventForMRP.getRelatedOne("Product", true);
- productFacility =
EntityUtil.getFirst(product.getRelatedByAndCache("ProductFacility",
UtilMisc.toMap("facilityId", facilityId)));
+ productFacility =
EntityUtil.getFirst(product.getRelated("ProductFacility",
UtilMisc.toMap("facilityId", facilityId), null, true));
} catch (GenericEntityException e) {
return
ServiceUtil.returnError(UtilProperties.getMessage(resource,
"ManufacturingMrpCannotFindProductForEvent", locale));
}
Modified:
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
(original)
+++
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
Tue May 29 04:20:58 2012
@@ -111,7 +111,7 @@ if (productionRunId) {
}
delivProducts = [];
if (templateTask) {
- delivProducts =
EntityUtil.filterByDate(templateTask.getRelatedByAnd("WorkEffortGoodStandard",
[workEffortGoodStdTypeId : "PRUNT_PROD_DELIV"]));
+ delivProducts =
EntityUtil.filterByDate(templateTask.getRelated("WorkEffortGoodStandard",
[workEffortGoodStdTypeId : "PRUNT_PROD_DELIV"], null, false));
}
context.delivProducts = delivProducts;
// Get the list of delivered products, i.e. inventory items
Modified:
ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy
(original)
+++
ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy
Tue May 29 04:20:58 2012
@@ -24,9 +24,9 @@ if (!contactList && contactListId) {
if (contactList) {
ownerParty = contactList.getRelatedOne("OwnerParty", false);
if (ownerParty) {
- contactMechs = ownerParty.getRelatedByAnd("PartyContactMechPurpose",
[contactMechPurposeTypeId : "MARKETING_EMAIL"]);
+ contactMechs = ownerParty.getRelated("PartyContactMechPurpose",
[contactMechPurposeTypeId : "MARKETING_EMAIL"], null, false);
if (!contactMechs) {
- contactMechs =
ownerParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId
: "PRIMARY_EMAIL"]);
+ contactMechs = ownerParty.getRelated("PartyContactMechPurpose",
[contactMechPurposeTypeId : "PRIMARY_EMAIL"], null, false);
}
if (contactMechs) {
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
Tue May 29 04:20:58 2012
@@ -466,7 +466,7 @@ public class OrderReadHelper {
@Deprecated
public GenericValue getShippingAddress() {
try {
- GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION")));
+ GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelated("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION"), null, false));
if (orderContactMech != null) {
GenericValue contactMech =
orderContactMech.getRelatedOne("ContactMech", false);
@@ -507,7 +507,7 @@ public class OrderReadHelper {
public GenericValue getBillingAddress() {
GenericValue billingAddress = null;
try {
- GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION")));
+ GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelated("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION"), null, false));
if (orderContactMech != null) {
GenericValue contactMech =
orderContactMech.getRelatedOne("ContactMech", false);
@@ -557,7 +557,7 @@ public class OrderReadHelper {
public List<GenericValue> getOrderContactMechs(String purposeTypeId) {
try {
- return orderHeader.getRelatedByAnd("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", purposeTypeId));
+ return orderHeader.getRelated("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", purposeTypeId), null, false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -727,7 +727,7 @@ public class OrderReadHelper {
Delegator delegator = orderHeader.getDelegator();
GenericValue partyObject = null;
try {
- GenericValue orderRole =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole",
UtilMisc.toMap("roleTypeId", roleTypeId)));
+ GenericValue orderRole =
EntityUtil.getFirst(orderHeader.getRelated("OrderRole",
UtilMisc.toMap("roleTypeId", roleTypeId), null, false));
if (orderRole != null) {
partyObject = delegator.findOne("Person",
UtilMisc.toMap("partyId", orderRole.getString("partyId")), false);
@@ -744,7 +744,7 @@ public class OrderReadHelper {
public String getDistributorId() {
try {
- GenericEntity distributorRole =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole",
UtilMisc.toMap("roleTypeId", "DISTRIBUTOR")));
+ GenericEntity distributorRole =
EntityUtil.getFirst(orderHeader.getRelated("OrderRole",
UtilMisc.toMap("roleTypeId", "DISTRIBUTOR"), null, false));
return distributorRole == null ? null :
distributorRole.getString("partyId");
} catch (GenericEntityException e) {
@@ -755,7 +755,7 @@ public class OrderReadHelper {
public String getAffiliateId() {
try {
- GenericEntity distributorRole =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole",
UtilMisc.toMap("roleTypeId", "AFFILIATE")));
+ GenericEntity distributorRole =
EntityUtil.getFirst(orderHeader.getRelated("OrderRole",
UtilMisc.toMap("roleTypeId", "AFFILIATE"), null, false));
return distributorRole == null ? null :
distributorRole.getString("partyId");
} catch (GenericEntityException e) {
@@ -798,7 +798,7 @@ public class OrderReadHelper {
// get the ADDITIONAL_FEATURE adjustments
List<GenericValue> additionalFeatures = null;
try {
- additionalFeatures = item.getRelatedByAnd("OrderAdjustment",
UtilMisc.toMap("orderAdjustmentTypeId", "ADDITIONAL_FEATURE"));
+ additionalFeatures = item.getRelated("OrderAdjustment",
UtilMisc.toMap("orderAdjustmentTypeId", "ADDITIONAL_FEATURE"), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderAdjustment from item : " +
item, module);
}
@@ -844,7 +844,7 @@ public class OrderReadHelper {
// get the ADDITIONAL_FEATURE adjustments
List<GenericValue> additionalFeatures = null;
try {
- additionalFeatures =
item.getRelatedByAnd("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId",
"ADDITIONAL_FEATURE"));
+ additionalFeatures = item.getRelated("OrderAdjustment",
UtilMisc.toMap("orderAdjustmentTypeId", "ADDITIONAL_FEATURE"), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderAdjustment from item
: " + item, module);
}
@@ -1256,14 +1256,14 @@ public class OrderReadHelper {
if ("PAYMENT_CANCELLED".equals(pref.get("statusId")) ||
"PAYMENT_DECLINED".equals(pref.get("statusId"))) {
continue;
} else if ("PAYMENT_SETTLED".equals(pref.get("statusId"))) {
- List<GenericValue> responses =
pref.getRelatedByAnd("PaymentGatewayResponse",
UtilMisc.toMap("transCodeEnumId", "PGT_CAPTURE"));
+ List<GenericValue> responses =
pref.getRelated("PaymentGatewayResponse", UtilMisc.toMap("transCodeEnumId",
"PGT_CAPTURE"), null, false);
for(GenericValue response : responses) {
BigDecimal amount = response.getBigDecimal("amount");
if (amount != null) {
openAmount = openAmount.add(amount);
}
}
- responses = pref.getRelatedByAnd("PaymentGatewayResponse",
UtilMisc.toMap("transCodeEnumId", "PGT_REFUND"));
+ responses = pref.getRelated("PaymentGatewayResponse",
UtilMisc.toMap("transCodeEnumId", "PGT_REFUND"), null, false);
for(GenericValue response : responses) {
BigDecimal amount = response.getBigDecimal("amount");
if (amount != null) {
@@ -2667,7 +2667,7 @@ public class OrderReadHelper {
} else if (security.hasEntityPermission("ORDERMGR", "_ROLEVIEW",
userLogin)) {
List<GenericValue> orderRoles = null;
try {
- orderRoles = orderHeader.getRelatedByAnd("OrderRole",
UtilMisc.toMap("partyId", userLogin.getString("partyId")));
+ orderRoles = orderHeader.getRelated("OrderRole",
UtilMisc.toMap("partyId", userLogin.getString("partyId")), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, "Cannot get OrderRole from OrderHeader",
module);
}
@@ -2774,7 +2774,7 @@ public class OrderReadHelper {
String attributeValue = null;
if (orderItem != null) {
try {
- GenericValue orderItemAttribute =
EntityUtil.getFirst(orderItem.getRelatedByAnd("OrderItemAttribute",
UtilMisc.toMap("attrName", attributeName)));
+ GenericValue orderItemAttribute =
EntityUtil.getFirst(orderItem.getRelated("OrderItemAttribute",
UtilMisc.toMap("attrName", attributeName), null, false));
if (orderItemAttribute != null) {
attributeValue = orderItemAttribute.getString("attrValue");
}
@@ -2789,7 +2789,7 @@ public class OrderReadHelper {
String attributeValue = null;
if (orderHeader != null) {
try {
- GenericValue orderAttribute =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderAttribute",
UtilMisc.toMap("attrName", attributeName)));
+ GenericValue orderAttribute =
EntityUtil.getFirst(orderHeader.getRelated("OrderAttribute",
UtilMisc.toMap("attrName", attributeName), null, false));
if (orderAttribute != null) {
attributeValue = orderAttribute.getString("attrValue");
}
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
Tue May 29 04:20:58 2012
@@ -705,7 +705,7 @@ public class OrderReturnServices {
try {
returnHeader = delegator.findOne("ReturnHeader",
UtilMisc.toMap("returnId", returnId), false);
if (returnHeader != null) {
- returnItems = returnHeader.getRelatedByAnd("ReturnItem",
UtilMisc.toMap("returnTypeId", "RTN_CREDIT"));
+ returnItems = returnHeader.getRelated("ReturnItem",
UtilMisc.toMap("returnTypeId", "RTN_CREDIT"), null, false);
}
} catch (GenericEntityException e) {
Debug.logError(e, "Problems looking up return information",
module);
@@ -1193,7 +1193,7 @@ public class OrderReturnServices {
try {
returnHeader = delegator.findOne("ReturnHeader",
UtilMisc.toMap("returnId", returnId), false);
if (returnHeader != null) {
- returnItems = returnHeader.getRelatedByAnd("ReturnItem",
UtilMisc.toMap("returnTypeId", returnTypeId));
+ returnItems = returnHeader.getRelated("ReturnItem",
UtilMisc.toMap("returnTypeId", returnTypeId), null, false);
}
} catch (GenericEntityException e) {
Debug.logError(e, "Problems looking up return information",
module);
@@ -1705,7 +1705,7 @@ public class OrderReturnServices {
try {
returnHeader = delegator.findOne("ReturnHeader",
UtilMisc.toMap("returnId", returnId), false);
if (returnHeader != null) {
- returnItems = returnHeader.getRelatedByAnd("ReturnItem",
UtilMisc.toMap("returnTypeId", returnTypeId));
+ returnItems = returnHeader.getRelated("ReturnItem",
UtilMisc.toMap("returnTypeId", returnTypeId), null, false);
}
} catch (GenericEntityException e) {
Debug.logError(e, "Problems looking up return information",
module);
@@ -2188,7 +2188,7 @@ public class OrderReturnServices {
try {
returnHeader = delegator.findOne("ReturnHeader",
UtilMisc.toMap("returnId", returnId), false);
if (returnHeader != null) {
- returnItems = returnHeader.getRelatedByAnd("ReturnItem",
UtilMisc.toMap("returnTypeId", "RTN_REFUND"));
+ returnItems = returnHeader.getRelated("ReturnItem",
UtilMisc.toMap("returnTypeId", "RTN_REFUND"), null, false);
}
} catch (GenericEntityException e) {
Debug.logError(e, module);
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Tue May 29 04:20:58 2012
@@ -152,7 +152,7 @@ public class OrderServices {
// check sales agent/customer relationship
List<GenericValue> repsCustomers = new
LinkedList<GenericValue>();
try {
- repsCustomers =
EntityUtil.filterByDate(userLogin.getRelatedOne("Party",
false).getRelatedByAnd("FromPartyRelationship",
UtilMisc.toMap("roleTypeIdFrom", "AGENT", "roleTypeIdTo", "CUSTOMER",
"partyIdTo", partyId)));
+ repsCustomers =
EntityUtil.filterByDate(userLogin.getRelatedOne("Party",
false).getRelated("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom",
"AGENT", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId), null, false));
} catch (GenericEntityException ex) {
Debug.logError("Could not determine if " + partyId + "
is a customer of user " + userLogin.getString("userLoginId") + " due to " +
ex.getMessage(), module);
}
@@ -162,7 +162,7 @@ public class OrderServices {
if (!hasPermission) {
// check sales sales rep/customer relationship
try {
- repsCustomers =
EntityUtil.filterByDate(userLogin.getRelatedOne("Party",
false).getRelatedByAnd("FromPartyRelationship",
UtilMisc.toMap("roleTypeIdFrom", "SALES_REP", "roleTypeIdTo", "CUSTOMER",
"partyIdTo", partyId)));
+ repsCustomers =
EntityUtil.filterByDate(userLogin.getRelatedOne("Party",
false).getRelated("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom",
"SALES_REP", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId), null, false));
} catch (GenericEntityException ex) {
Debug.logError("Could not determine if " + partyId
+ " is a customer of user " + userLogin.getString("userLoginId") + " due to " +
ex.getMessage(), module);
}
@@ -2864,7 +2864,7 @@ public class OrderServices {
}
for (int i = 0; i < purpose.length; i++) {
try {
- GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", purpose[i])));
+ GenericValue orderContactMech =
EntityUtil.getFirst(orderHeader.getRelated("OrderContactMech",
UtilMisc.toMap("contactMechPurposeTypeId", purpose[i]), null, false));
GenericValue contactMech =
orderContactMech.getRelatedOne("ContactMech", false);
if (contactMech != null) {
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
Tue May 29 04:20:58 2012
@@ -82,7 +82,7 @@ if (orderHeader) {
if (billToParty) {
partyId = billToParty.partyId;
} else {
- def billToCustomer =
EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole", [roleTypeId :
"BILL_TO_CUSTOMER"]));
+ def billToCustomer =
EntityUtil.getFirst(orderHeader.getRelated("OrderRole", [roleTypeId :
"BILL_TO_CUSTOMER"], null, false));
if (billToCustomer) {
partyId = billToCustomer.partyId;
}
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
Tue May 29 04:20:58 2012
@@ -39,7 +39,7 @@ context.shipGroups = shipGroups;
// method to expand the marketing packages
FastList expandProductGroup(product, quantityInGroup, quantityShipped,
quantityOpen, assocType) {
sublines = FastList.newInstance();
- associations = product.getRelatedByAnd("MainProductAssoc",
[productAssocTypeId : assocType]);
+ associations = product.getRelated("MainProductAssoc", [productAssocTypeId
: assocType], null, false);
associations = EntityUtil.filterByDate(associations);
associations.each { association ->
line = FastMap.newInstance();
Modified:
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
(original)
+++
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
Tue May 29 04:20:58 2012
@@ -397,7 +397,7 @@ public class CommunicationEventServices
if (UtilValidate.isNotEmpty(webSite)) {
GenericValue productStore =
webSite.getRelatedOne("ProductStore", false);
if (UtilValidate.isNotEmpty(productStore)) {
- List<GenericValue> productStoreEmailSettings =
productStore.getRelatedByAnd("ProductStoreEmailSetting",
UtilMisc.toMap("emailType", "CONT_EMAIL_TEMPLATE"));
+ List<GenericValue> productStoreEmailSettings =
productStore.getRelated("ProductStoreEmailSetting", UtilMisc.toMap("emailType",
"CONT_EMAIL_TEMPLATE"), null, false);
GenericValue productStoreEmailSetting =
EntityUtil.getFirst(productStoreEmailSettings);
if
(UtilValidate.isNotEmpty(productStoreEmailSetting)) {
// send e-mail using screen template
Modified:
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java
(original)
+++
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java
Tue May 29 04:20:58 2012
@@ -60,7 +60,7 @@ public class ContactHelper {
} else {
List<GenericValue> list;
- list = party.getRelatedByAnd("PartyContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", contactMechPurposeTypeId));
+ list = party.getRelated("PartyContactMechPurpose",
UtilMisc.toMap("contactMechPurposeTypeId", contactMechPurposeTypeId), null,
false);
if (!includeOld) {
list = EntityUtil.filterByDate(list, true);
}
Modified:
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
(original)
+++
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
Tue May 29 04:20:58 2012
@@ -22,7 +22,7 @@
if (userLogin) {
userLoginParty = userLogin.getRelatedOne("Party", true);
if (userLoginParty) {
- userLoginPartyPrimaryEmails =
userLoginParty.getRelatedByAnd("PartyContactMechPurpose",
[contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
+ userLoginPartyPrimaryEmails =
userLoginParty.getRelated("PartyContactMechPurpose", [contactMechPurposeTypeId
: "PRIMARY_EMAIL"], null, false);
if (userLoginPartyPrimaryEmails) {
context.thisUserPrimaryEmail = userLoginPartyPrimaryEmails.get(0);
}
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
Tue May 29 04:20:58 2012
@@ -684,7 +684,7 @@ public class ProductEvents {
if ("Y".equals(product.getString("isVirtual"))) {
boolean foundFeatureOnVariant = false;
// get/check all the variants
- List<GenericValue> variantAssocs =
product.getRelatedByAnd("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> variantAssocs =
product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId",
"PRODUCT_VARIANT"), null, false);
variantAssocs =
EntityUtil.filterByDate(variantAssocs);
List<GenericValue> variants =
EntityUtil.getRelated("AssocProduct", variantAssocs);
Iterator<GenericValue> variantIter =
variants.iterator();
@@ -769,7 +769,7 @@ public class ProductEvents {
try {
GenericValue product = delegator.findOne("Product",
UtilMisc.toMap("productId", productId), false);
// get all the variants
- List<GenericValue> variantAssocs =
product.getRelatedByAnd("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> variantAssocs =
product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId",
"PRODUCT_VARIANT"), null, false);
variantAssocs = EntityUtil.filterByDate(variantAssocs);
List<GenericValue> variants =
EntityUtil.getRelated("AssocProduct", variantAssocs);
for (GenericValue variant: variants) {
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
Tue May 29 04:20:58 2012
@@ -413,7 +413,7 @@ public class ProductServices {
GenericValue mainProduct = product;
if (product.get("isVariant") != null &&
product.getString("isVariant").equalsIgnoreCase("Y")) {
- List<GenericValue> c =
product.getRelatedByAndCache("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> c = product.getRelated("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), null, true);
//if (Debug.infoOn()) Debug.logInfo("Found related: " + c,
module);
c = EntityUtil.filterByDate(c);
//if (Debug.infoOn()) Debug.logInfo("Found Filtered related: "
+ c, module);
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
Tue May 29 04:20:58 2012
@@ -150,7 +150,7 @@ public class ProductWorker {
GenericValue instanceProduct = delegator.findOne("Product",
UtilMisc.toMap("productId", instanceProductId), false);
if (UtilValidate.isNotEmpty(instanceProduct) &&
EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId",
instanceProduct.getString("productTypeId"), "parentTypeId", "AGGREGATED")) {
- GenericValue productAssoc =
EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))));
+ GenericValue productAssoc =
EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelated("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"), null, false)));
if (UtilValidate.isNotEmpty(productAssoc)) {
return productAssoc.getString("productId");
}
@@ -175,7 +175,7 @@ public class ProductWorker {
GenericValue aggregatedProduct = delegator.findOne("Product",
UtilMisc.toMap("productId", aggregatedProductId), false);
if (UtilValidate.isNotEmpty(aggregatedProduct) &&
("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) ||
"AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) {
- List<GenericValue> productAssocs =
EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")));
+ List<GenericValue> productAssocs =
EntityUtil.filterByDate(aggregatedProduct.getRelated("MainProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"), null, false));
return productAssocs;
}
return null;
@@ -196,7 +196,7 @@ public class ProductWorker {
public static List<GenericValue> getVariantVirtualAssocs(GenericValue
variantProduct) throws GenericEntityException {
if (variantProduct != null &&
"Y".equals(variantProduct.getString("isVariant"))) {
- List<GenericValue> productAssocs =
EntityUtil.filterByDate(variantProduct.getRelatedByAndCache("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT")));
+ List<GenericValue> productAssocs =
EntityUtil.filterByDate(variantProduct.getRelated("AssocProductAssoc",
UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), null, true));
return productAssocs;
}
return null;
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
Tue May 29 04:20:58 2012
@@ -1574,7 +1574,7 @@ public class UspsServices {
shipmentPackageContents =
shipmentPackage.getRelated("ShipmentPackageContent", null, null, false);
GenericValue shipmentBoxType =
shipmentPackage.getRelatedOne("ShipmentBoxType", false);
if (shipmentBoxType != null) {
- GenericValue carrierShipmentBoxType =
EntityUtil.getFirst(shipmentBoxType.getRelatedByAnd("CarrierShipmentBoxType",
UtilMisc.toMap("partyId", "USPS")));
+ GenericValue carrierShipmentBoxType =
EntityUtil.getFirst(shipmentBoxType.getRelated("CarrierShipmentBoxType",
UtilMisc.toMap("partyId", "USPS"), null, false));
if (carrierShipmentBoxType != null) {
packageTypeCode =
carrierShipmentBoxType.getString("packageTypeCode");
// Supported type codes
Modified:
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
(original)
+++
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
Tue May 29 04:20:58 2012
@@ -227,7 +227,7 @@ if (product) {
context.thrudate = thrudate;
// get all variants - associations first
- productAssocs = product.getRelatedByAnd("MainProductAssoc",
[productAssocTypeId : 'PRODUCT_VARIANT']);
+ productAssocs = product.getRelated("MainProductAssoc", [productAssocTypeId
: 'PRODUCT_VARIANT'], null, false);
Iterator productAssocIter = productAssocs.iterator();
// get shipping dimensions and weights for all the variants
while (productAssocIter) {
Modified: ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl Tue
May 29 04:20:58 2012
@@ -21,7 +21,7 @@ under the License.
<#assign sortList =
Static["org.ofbiz.base.util.UtilMisc"].toList("prodCatalogCategoryTypeId",
"sequenceNum", "productCategoryId")>
<#list prodCatalogs as prodCatalog>
<#if curProdCatalogId?exists && curProdCatalogId ==
prodCatalog.prodCatalogId>
- <#assign prodCatalogCategories =
prodCatalog.getRelatedOrderByCache("ProdCatalogCategory", sortList)>
+ <#assign prodCatalogCategories =
prodCatalog.getRelated("ProdCatalogCategory", null, sortList, true)>
<div class='browsecategorytext'><a
href="<@ofbizUrl>EditProdCatalog?prodCatalogId=${prodCatalog.prodCatalogId}</@ofbizUrl>"
class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div>
<div class="browsecategorylist">
<#list prodCatalogCategories as prodCatalogCategory>
Modified:
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
(original)
+++
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
Tue May 29 04:20:58 2012
@@ -134,7 +134,7 @@ if (shipment && selectFromShipmentPlan)
}
orderItemShipGroupAssoc = null;
- orderItemShipGroupAssocs =
orderItem.getRelatedByAnd("OrderItemShipGroupAssoc", oiasgaLimitMap);
+ orderItemShipGroupAssocs =
orderItem.getRelated("OrderItemShipGroupAssoc", oiasgaLimitMap, null, false);
if (orderItemShipGroupAssocs) {
orderItemShipGroupAssoc =
EntityUtil.getFirst(orderItemShipGroupAssocs);
}
Modified:
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
(original)
+++
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Tue May 29 04:20:58 2012
@@ -98,8 +98,8 @@ if (picklistBinId) {
if (bin) {
orderId = bin.primaryOrderId;
shipGroupSeqId = bin.primaryShipGroupSeqId;
- packSession.addItemInfo(bin.getRelatedByAnd("PicklistItem",
[itemStatusId : 'PICKITEM_PENDING']));
- //context.put("picklistItemInfos", bin.getRelatedByAnd("PicklistItem",
UtilMisc.toMap("itemStatusId", "PICKITEM_PENDING")));
+ packSession.addItemInfo(bin.getRelated("PicklistItem", [itemStatusId :
'PICKITEM_PENDING'], null, false));
+ //context.put("picklistItemInfos", bin.getRelated("PicklistItem",
UtilMisc.toMap("itemStatusId", "PICKITEM_PENDING"), null, false));
}
} else {
picklistBinId = null;
Modified:
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
(original)
+++
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
Tue May 29 04:20:58 2012
@@ -187,7 +187,7 @@ under the License.
</tr>
<#-- facility location(s) -->
- <#assign facilityLocations =
(product.getRelatedByAnd("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId",
facilityId)))?if_exists/>
+ <#assign facilityLocations =
(product.getRelated("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId", facilityId), null,
false))?if_exists/>
<tr>
<td width="14%"> </td>
<td width="6%" align="right" nowrap="nowrap"
class="label">${uiLabelMap.ProductFacilityLocation}</td>
@@ -399,7 +399,7 @@ under the License.
<td align="right">${uiLabelMap.ProductLocation}:</td>
<#-- location(s) -->
<td align="right">
- <#assign facilityLocations =
(orderItem.getRelatedByAnd("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId",
facilityId)))?if_exists/>
+ <#assign facilityLocations =
(orderItem.getRelated("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId", facilityId), null,
false))?if_exists/>
<#if facilityLocations?has_content>
<select name="locationSeqId_o_${rowCount}">
<#list facilityLocations as
productFacilityLocation>
Modified:
ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl?rev=1343528&r1=1343527&r2=1343528&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl
Tue May 29 04:20:58 2012
@@ -107,7 +107,7 @@ under the License.
<#if orderItem.productId?exists>
<#assign product =
orderItem.getRelatedOne("Product", false)>
<#assign productId = product.productId>
- <#assign serializedInv =
product.getRelatedByAnd("InventoryItem",
Static["org.ofbiz.base.util.UtilMisc"].toMap("inventoryItemTypeId",
"SERIALIZED_INV_ITEM"))>
+ <#assign serializedInv =
product.getRelated("InventoryItem",
Static["org.ofbiz.base.util.UtilMisc"].toMap("inventoryItemTypeId",
"SERIALIZED_INV_ITEM"), null, false)>
<input type="hidden"
name="productId_o_${rowCount}" value="${product.productId}" />
<td width="45%">
<div>
@@ -137,7 +137,7 @@ under the License.
<div
class="label">${uiLabelMap.ProductLocation}</div>
</td>
<td align="right">
- <#assign facilityLocations =
(product.getRelatedByAnd("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId",
facilityId)))?if_exists>
+ <#assign facilityLocations =
(product.getRelated("ProductFacilityLocation",
Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId", facilityId), null,
false))?if_exists>
<#if facilityLocations?has_content>
<select name="locationSeqId_o_${rowCount}">
<#list facilityLocations as
productFacilityLocation>