You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 06:14:05 UTC

svn commit: r1343488 [1/3] - in /ofbiz/trunk/applications/product: src/org/ofbiz/product/category/ src/org/ofbiz/product/config/ src/org/ofbiz/product/imagemanagement/ src/org/ofbiz/product/inventory/ src/org/ofbiz/product/price/ src/org/ofbiz/product/...

Author: doogie
Date: Tue May 29 04:14:02 2012
New Revision: 1343488

URL: http://svn.apache.org/viewvc?rev=1343488&view=rev
Log:
DEPRECATION: applications/product: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.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/packing/PackingSession.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
    ofbiz/trunk/applications/product/webapp/catalog/category/EditCategoryFeatureCats.ftl
    ofbiz/trunk/applications/product/webapp/catalog/category/EditCategoryParties.ftl
    ofbiz/trunk/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl
    ofbiz/trunk/applications/product/webapp/catalog/category/EditCategoryProducts.ftl
    ofbiz/trunk/applications/product/webapp/catalog/category/EditCategoryRollup.ftl
    ofbiz/trunk/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl
    ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
    ofbiz/trunk/applications/product/webapp/catalog/find/FindProductById.ftl
    ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl
    ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl
    ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductAssoc.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductParties.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/ViewProductOrders.ftl
    ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
    ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoStores.ftl
    ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl
    ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreSurveys.ftl
    ofbiz/trunk/applications/product/webapp/catalog/thesaurus/EditKeywordThesaurus.ftl
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ViewShipment.groovy
    ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/FindFacilityLocation.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/PicklistManage.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl
    ofbiz/trunk/applications/product/webapp/facility/inventory/TransferInventoryItem.ftl
    ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
    ofbiz/trunk/applications/product/webapp/facility/returns/receiveReturn.ftl
    ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl
    ofbiz/trunk/applications/product/webapp/facility/shipment/PackingSlip.fo.ftl
    ofbiz/trunk/applications/product/webapp/facility/shipment/QuickShipOrder.ftl
    ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl
    ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java Tue May 29 04:14:02 2012
@@ -97,7 +97,7 @@ public class CatalogUrlFilter extends Co
                             List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAnd("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                             if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){
                                 for (GenericValue ContentAssocDataResourceViewTo : ContentAssocDataResourceViewTos) {
-                                    GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOneCache("ElectronicText");
+                                    GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOne("ElectronicText", true);
                                     if (UtilValidate.isNotEmpty(ElectronicText)) {
                                         String textData = (String) ElectronicText.get("textData");
                                         textData = UrlServletHelper.invalidCharacter(textData);
@@ -117,7 +117,7 @@ public class CatalogUrlFilter extends Co
                             if (UtilValidate.isEmpty(productId)) {
                                 List<GenericValue> contentDataResourceViews = delegator.findByAnd("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                                 for (GenericValue contentDataResourceView : contentDataResourceViews) {
-                                    GenericValue ElectronicText = contentDataResourceView.getRelatedOneCache("ElectronicText");
+                                    GenericValue ElectronicText = contentDataResourceView.getRelatedOne("ElectronicText", true);
                                     if (UtilValidate.isNotEmpty(ElectronicText)) {
                                         String textData = (String) ElectronicText.get("textData");
                                         if (UtilValidate.isNotEmpty(textData)) {
@@ -152,7 +152,7 @@ public class CatalogUrlFilter extends Co
                             List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAnd("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                             if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){
                                 for (GenericValue ContentAssocDataResourceViewTo : ContentAssocDataResourceViewTos) {
-                                    GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOneCache("ElectronicText");
+                                    GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOne("ElectronicText", true);
                                     if (UtilValidate.isNotEmpty(ElectronicText)){
                                         String textData = (String) ElectronicText.get("textData");
                                         if (UtilValidate.isNotEmpty(textData)) {
@@ -174,7 +174,7 @@ public class CatalogUrlFilter extends Co
                             if (UtilValidate.isEmpty(productCategoryId)) {
                                 List<GenericValue> contentDataResourceViews = delegator.findByAnd("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                                 for (GenericValue contentDataResourceView : contentDataResourceViews) {
-                                    GenericValue ElectronicText = contentDataResourceView.getRelatedOneCache("ElectronicText");
+                                    GenericValue ElectronicText = contentDataResourceView.getRelatedOne("ElectronicText", true);
                                     if (UtilValidate.isNotEmpty(ElectronicText)) {
                                         String textData = (String) ElectronicText.get("textData");
                                         if (UtilValidate.isNotEmpty(textData)) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Tue May 29 04:14:02 2012
@@ -164,7 +164,7 @@ public class CategoryWorker {
                 GenericValue cv = null;
 
                 try {
-                    cv = parent.getRelatedOneCache("CurrentProductCategory");
+                    cv = parent.getRelatedOne("CurrentProductCategory", true);
                 } catch (GenericEntityException e) {
                     Debug.logWarning(e.getMessage(), module);
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Tue May 29 04:14:02 2012
@@ -397,7 +397,7 @@ public class ProductConfigWrapper implem
 
         public ConfigItem(GenericValue questionAssoc) throws Exception {
             configItemAssoc = questionAssoc;
-            configItem = configItemAssoc.getRelatedOne("ConfigItemProductConfigItem");
+            configItem = configItemAssoc.getRelatedOne("ConfigItemProductConfigItem", false);
             options = FastList.newInstance();
         }
 
@@ -564,7 +564,7 @@ public class ProductConfigWrapper implem
                 BigDecimal listPrice = BigDecimal.ZERO;
                 BigDecimal price = BigDecimal.ZERO;
                 // Get the component's price
-                Map<String, Object> fieldMap = UtilMisc.toMap("product", oneComponent.getRelatedOne("ProductProduct"), "prodCatalogId", catalogId, "webSiteId", webSiteId, "currencyUomId", currencyUomId, "productPricePurposeId", "COMPONENT_PRICE", "autoUserLogin", autoUserLogin, "productStoreId",productStoreId);
+                Map<String, Object> fieldMap = UtilMisc.toMap("product", oneComponent.getRelatedOne("ProductProduct", false), "prodCatalogId", catalogId, "webSiteId", webSiteId, "currencyUomId", currencyUomId, "productPricePurposeId", "COMPONENT_PRICE", "autoUserLogin", autoUserLogin, "productStoreId",productStoreId);
                 Map<String, Object> priceMap = dispatcher.runSync("calculateProductPrice", fieldMap);
                 BigDecimal componentListPrice = (BigDecimal) priceMap.get("listPrice");
                 BigDecimal componentPrice = (BigDecimal) priceMap.get("price");
@@ -620,7 +620,7 @@ public class ProductConfigWrapper implem
             for (GenericValue oneComponent: componentList) {
                 BigDecimal listPrice = BigDecimal.ZERO;
                 BigDecimal price = BigDecimal.ZERO;
-                GenericValue oneComponentProduct = oneComponent.getRelatedOne("ProductProduct");
+                GenericValue oneComponentProduct = oneComponent.getRelatedOne("ProductProduct", false);
                 String variantProductId = componentOptions.get(oneComponent.getString("productId"));
 
                 if (UtilValidate.isNotEmpty(variantProductId)) {
@@ -744,7 +744,7 @@ public class ProductConfigWrapper implem
             int index = getComponents().indexOf(component);
             if (index != -1) {
                 try {
-                    GenericValue product = component.getRelatedOne("ProductProduct");
+                    GenericValue product = component.getRelatedOne("ProductProduct", false);
                     return "Y".equals(product.getString("isVirtual"));
                 } catch (GenericEntityException e) {
                     Debug.logWarning(e.getMessage(), module);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Tue May 29 04:14:02 2012
@@ -476,7 +476,7 @@ public class ImageManagementServices {
         if (content != null) {
             GenericValue dataResource = null;
             try {
-                dataResource = content.getRelatedOne("DataResource");
+                dataResource = content.getRelatedOne("DataResource", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
                 return ServiceUtil.returnError(e.getMessage());
@@ -966,7 +966,7 @@ public class ImageManagementServices {
                 if (content != null) {
                     GenericValue dataResource = null;
                     try {
-                        dataResource = content.getRelatedOne("DataResource");
+                        dataResource = content.getRelatedOne("DataResource", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(e.getMessage());
@@ -1025,7 +1025,7 @@ public class ImageManagementServices {
                         if (contentAssocUp != null) {
                             GenericValue dataResourceAssocUp = null;
                             try {
-                                dataResourceAssocUp = contentAssocUp.getRelatedOne("DataResource");
+                                dataResourceAssocUp = contentAssocUp.getRelatedOne("DataResource", false);
                             } catch (GenericEntityException e) {
                                 Debug.logError(e, module);
                                 return ServiceUtil.returnError(e.getMessage());

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java Tue May 29 04:14:02 2012
@@ -102,7 +102,7 @@ public class ImageUrlServlet extends Htt
         if (content != null) {
             GenericValue dataResource = null;
             try {
-                dataResource = content.getRelatedOne("DataResource");
+                dataResource = content.getRelatedOne("DataResource", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
             }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java Tue May 29 04:14:02 2012
@@ -289,7 +289,7 @@ public class WatermarkImage{
         if (content != null) {
             GenericValue dataResource = null;
             try {
-                dataResource = content.getRelatedOne("DataResource");
+                dataResource = content.getRelatedOne("DataResource", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
                 return ServiceUtil.returnError(e.getMessage());

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Tue May 29 04:14:02 2012
@@ -225,8 +225,8 @@ public class InventoryServices {
         try {
             inventoryTransfer = delegator.findOne("InventoryTransfer",
                     UtilMisc.toMap("inventoryTransferId", inventoryTransferId), false);
-            inventoryItem = inventoryTransfer.getRelatedOne("InventoryItem");
-            destinationFacility = inventoryTransfer.getRelatedOne("ToFacility");
+            inventoryItem = inventoryTransfer.getRelatedOne("InventoryItem", false);
+            destinationFacility = inventoryTransfer.getRelatedOne("ToFacility", false);
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                     "ProductInventoryItemLookupProblem", 
@@ -343,7 +343,7 @@ public class InventoryServices {
                         "ProductInventoryItemTransferNotFound", 
                         UtilMisc.toMap("inventoryTransferId", inventoryTransferId), locale));
             }
-            inventoryItem = inventoryTransfer.getRelatedOne("InventoryItem");
+            inventoryItem = inventoryTransfer.getRelatedOne("InventoryItem", false);
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                     "ProductInventoryItemLookupProblem", 
@@ -608,7 +608,7 @@ public class InventoryServices {
                                         orderId), null, false);
 
                     for (GenericValue assoc: orderItemShipGroupAssoc) {
-                        GenericValue orderItem = assoc.getRelatedOne("OrderItem");
+                        GenericValue orderItem = assoc.getRelatedOne("OrderItem", false);
                         if (orderItem != null) {
                             orderItems.add(orderItem);
                         }
@@ -799,7 +799,7 @@ public class InventoryServices {
 
             GenericValue product = null;
             try {
-                product = orderItem.getRelatedOneCache("Product");
+                product = orderItem.getRelatedOne("Product", true);
             } catch (GenericEntityException e) {
                 Debug.logError(e, "Couldn't get product.", module);
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue May 29 04:14:02 2012
@@ -350,7 +350,7 @@ public class PriceServices {
             if ("ProductPrice".equals(defaultPriceValue.getEntityName()) && UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
                 GenericValue customMethod = null;
                 try {
-                    customMethod = defaultPriceValue.getRelatedOne("CustomMethod");
+                    customMethod = defaultPriceValue.getRelatedOne("CustomMethod", false);
                 } catch (GenericEntityException gee) {
                     Debug.logError(gee, "An error occurred while getting the customPriceCalcService", module);
                 }
@@ -842,11 +842,11 @@ public class PriceServices {
 
                 // add condsDescription string entry
                 condsDescription.append("[");
-                GenericValue inputParamEnum = productPriceCond.getRelatedOneCache("InputParamEnumeration");
+                GenericValue inputParamEnum = productPriceCond.getRelatedOne("InputParamEnumeration", true);
 
                 condsDescription.append(inputParamEnum.getString("enumCode"));
                 // condsDescription.append(":");
-                GenericValue operatorEnum = productPriceCond.getRelatedOneCache("OperatorEnumeration");
+                GenericValue operatorEnum = productPriceCond.getRelatedOne("OperatorEnumeration", true);
 
                 condsDescription.append(operatorEnum.getString("description"));
                 // condsDescription.append(":");

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Tue May 29 04:14:02 2012
@@ -1055,7 +1055,7 @@ public class ProductSearch {
             GenericValue productFeatureType = null;
             try {
                 productFeature = delegator.findOne("ProductFeature", UtilMisc.toMap("productFeatureId", productFeatureId), true);
-                productFeatureType = productFeature == null ? null : productFeature.getRelatedOne("ProductFeatureType");
+                productFeatureType = productFeature == null ? null : productFeature.getRelatedOne("ProductFeatureType", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, "Error finding ProductFeature and Type information for constraint pretty print", module);
             }
@@ -1312,7 +1312,7 @@ public class ProductSearch {
                         infoOut.append(", ");
                     }
                     GenericValue productFeature = delegator.findOne("ProductFeature", UtilMisc.toMap("productFeatureId", featureId), true);
-                    GenericValue productFeatureType = productFeature == null ? null : productFeature.getRelatedOneCache("ProductFeatureType");
+                    GenericValue productFeatureType = productFeature == null ? null : productFeature.getRelatedOne("ProductFeatureType", true);
                     if (productFeatureType == null) {
                         infoOut.append(UtilProperties.getMessage(resource, "ProductFeature", locale)).append(": ");
                     } else {

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=1343488&r1=1343487&r2=1343488&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:14:02 2012
@@ -421,7 +421,7 @@ public class ProductServices {
                     GenericValue asV = c.iterator().next();
 
                     //if (Debug.infoOn()) Debug.logInfo("ASV: " + asV, module);
-                    mainProduct = asV.getRelatedOneCache("MainProduct");
+                    mainProduct = asV.getRelatedOne("MainProduct", true);
                     //if (Debug.infoOn()) Debug.logInfo("Main product = " + mainProduct, module);
                 }
             }
@@ -858,7 +858,7 @@ public class ProductServices {
                     }
 
                     for (GenericValue goodIdentification: goodIdentificationList) {
-                        GenericValue giProduct = goodIdentification.getRelatedOne("Product");
+                        GenericValue giProduct = goodIdentification.getRelatedOne("Product", false);
                         if (giProduct != null) {
                             variantProductsById.put(giProduct.getString("productId"), giProduct);
                         }
@@ -1142,7 +1142,7 @@ public class ProductServices {
                 if (content != null) {
                     GenericValue dataResource = null;
                     try {
-                        dataResource = content.getRelatedOne("DataResource");
+                        dataResource = content.getRelatedOne("DataResource", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(e.getMessage());
@@ -1348,7 +1348,7 @@ public class ProductServices {
                     if (UtilValidate.isNotEmpty(content)) {
                         GenericValue dataResource = null;
                         try {
-                            dataResource = content.getRelatedOne("DataResource");
+                            dataResource = content.getRelatedOne("DataResource", false);
                         } catch (GenericEntityException e) {
                             Debug.logError(e, module);
                             return ServiceUtil.returnError(e.getMessage());

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=1343488&r1=1343487&r2=1343488&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:14:02 2012
@@ -162,7 +162,7 @@ public class ProductWorker {
         List<GenericValue> productAssocs = getAggregatedAssocs(delegator, aggregatedProductId);
         if (UtilValidate.isNotEmpty(productAssocs) && UtilValidate.isNotEmpty(configId)) {
             for (GenericValue productAssoc: productAssocs) {
-                GenericValue product = productAssoc.getRelatedOne("AssocProduct");
+                GenericValue product = productAssoc.getRelatedOne("AssocProduct", false);
                 if (configId.equals(product.getString("configId"))) {
                     return productAssoc.getString("productIdTo");
                 }
@@ -327,7 +327,7 @@ public class ProductWorker {
                             if (nameBuf.length() > 0) {
                                 nameBuf.append(", ");
                             }
-                            GenericValue productFeatureType = productFeature.getRelatedOneCache("ProductFeatureType");
+                            GenericValue productFeatureType = productFeature.getRelatedOne("ProductFeatureType", true);
                             if (productFeatureType != null) {
                                 nameBuf.append(productFeatureType.get("description", locale));
                                 nameBuf.append(":");
@@ -716,7 +716,7 @@ public class ProductWorker {
             if (UtilValidate.isNotEmpty(virtualProductAssocs)) {
                 //found one, set this first as the parent product
                 GenericValue productAssoc = EntityUtil.getFirst(virtualProductAssocs);
-                _parentProduct = productAssoc.getRelatedOneCache("MainProduct");
+                _parentProduct = productAssoc.getRelatedOne("MainProduct", true);
             }
         } catch (GenericEntityException e) {
             throw new RuntimeException("Entity Engine error getting Parent Product (" + e.getMessage() + ")");
@@ -729,7 +729,7 @@ public class ProductWorker {
         if (product != null) {
             GenericValue productType = null;
             try {
-                productType = product.getRelatedOneCache("ProductType");
+                productType = product.getRelatedOne("ProductType", true);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e.getMessage(), module);
             }
@@ -744,7 +744,7 @@ public class ProductWorker {
         if (product != null) {
             GenericValue productType = null;
             try {
-                productType = product.getRelatedOneCache("ProductType");
+                productType = product.getRelatedOne("ProductType", true);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e.getMessage(), module);
             }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Tue May 29 04:14:02 2012
@@ -153,7 +153,7 @@ public class PackingSession implements j
                 GenericValue res = i.next();
 
                 // Check that the inventory item product match with the current product to pack
-                if (!productId.equals(res.getRelatedOne("InventoryItem").getString("productId"))) {
+                if (!productId.equals(res.getRelatedOne("InventoryItem", false).getString("productId"))) {
                     continue;
                 }
 
@@ -999,8 +999,8 @@ public class PackingSession implements j
             if ("PicklistItem".equals(v.getEntityName())) {
                 quantity = v.getBigDecimal("quantity").setScale(2, BigDecimal.ROUND_HALF_UP);
                 try {
-                    orderItem = v.getRelatedOne("OrderItem");
-                    productId = v.getRelatedOne("InventoryItem").getString("productId");
+                    orderItem = v.getRelatedOne("OrderItem", false);
+                    productId = v.getRelatedOne("InventoryItem", false).getString("productId");
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Tue May 29 04:14:02 2012
@@ -341,15 +341,15 @@ public class ShipmentServices {
                 GenericValue pv = null;
 
                 try {
-                    wv = thisEstimate.getRelatedOne("WeightQuantityBreak");
+                    wv = thisEstimate.getRelatedOne("WeightQuantityBreak", false);
                 } catch (GenericEntityException e) {
                 }
                 try {
-                    qv = thisEstimate.getRelatedOne("QuantityQuantityBreak");
+                    qv = thisEstimate.getRelatedOne("QuantityQuantityBreak", false);
                 } catch (GenericEntityException e) {
                 }
                 try {
-                    pv = thisEstimate.getRelatedOne("PriceQuantityBreak");
+                    pv = thisEstimate.getRelatedOne("PriceQuantityBreak", false);
                 } catch (GenericEntityException e) {
                 }
                 if (wv == null && qv == null && pv == null) {
@@ -633,7 +633,7 @@ public class ShipmentServices {
         if ("SHIPMENT_PACKED".equals(shipmentStatusId)) {
             GenericValue address = null;
             try {
-                address = shipment.getRelatedOne("DestinationPostalAddress");
+                address = shipment.getRelatedOne("DestinationPostalAddress", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
                 return ServiceUtil.returnError(e.getMessage());
@@ -1102,7 +1102,7 @@ public class ShipmentServices {
                 BigDecimal packageContentValue = proportionOfInvoicedQuantity.multiply(invoicedAmount).setScale(decimals, rounding);
 
                 // Convert the value to the shipment currency, if necessary
-                GenericValue orderHeader = packageContent.getRelatedOne("OrderHeader");
+                GenericValue orderHeader = packageContent.getRelatedOne("OrderHeader", false);
                 Map<String, Object> convertUomResult = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", orderHeader.getString("currencyUom"), "uomIdTo", currencyUomId, "originalValue", packageContentValue));
                 if (ServiceUtil.isError(convertUomResult)) {
                     return convertUomResult;
@@ -1226,7 +1226,7 @@ public class ShipmentServices {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                         "ProductShipmentNotFoundId", locale) + shipmentId);
             }
-            GenericValue primaryOrderHeader = shipment.getRelatedOne("PrimaryOrderHeader");
+            GenericValue primaryOrderHeader = shipment.getRelatedOne("PrimaryOrderHeader", false);
             if (primaryOrderHeader == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                         "ProductShipmentPrimaryOrderHeaderNotFound", 
@@ -1238,7 +1238,7 @@ public class ShipmentServices {
                         "ProductShipmentPrimaryOrderHeaderProductStoreNotFound", 
                         UtilMisc.toMap("productStoreId", productStoreId, "shipmentId", shipmentId), locale));
             }
-            GenericValue primaryOrderItemShipGroup = shipment.getRelatedOne("PrimaryOrderItemShipGroup");
+            GenericValue primaryOrderItemShipGroup = shipment.getRelatedOne("PrimaryOrderItemShipGroup", false);
             if (primaryOrderItemShipGroup == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                         "ProductShipmentPrimaryOrderHeaderItemShipGroupNotFound", 

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Tue May 29 04:14:02 2012
@@ -58,7 +58,7 @@ public class ShipmentWorker {
         // lookup the issuance to find the order
         List<GenericValue> issuances = null;
         try {
-            GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem");
+            GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem", false);
             issuances = shipmentItem.getRelated("ItemIssuance");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
@@ -77,7 +77,7 @@ public class ShipmentWorker {
                 // get the order item
                 GenericValue orderItem = null;
                 try {
-                    orderItem = issuance.getRelatedOne("OrderItem");
+                    orderItem = issuance.getRelatedOne("OrderItem", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Tue May 29 04:14:02 2012
@@ -549,13 +549,13 @@ public class DhlServices {
             }
 
             // Get Origin Info
-            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginPostalAddressNotFound", 
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
             if (originTelecomNumber == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginTelecomNumberNotFound", 
@@ -570,7 +570,7 @@ public class DhlServices {
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
 
             // lookup the two letter country code (in the geoCode field)
-            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
             if (originCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginCountryGeoNotFound", 
@@ -578,7 +578,7 @@ public class DhlServices {
             }
 
             // Get Dest Info
-            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestPostalAddressNotFound", 
@@ -587,7 +587,7 @@ public class DhlServices {
 
             // DHL requires destination phone number, default to sender # if no customer number
             String destPhoneNumber = originPhoneNumber;
-            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             if (destTelecomNumber != null) {
                 destPhoneNumber = destTelecomNumber.getString("areaCode") + destTelecomNumber.getString("contactNumber");
                 // don't put on country code if not specified or is the US country code (UPS wants it this way)
@@ -605,7 +605,7 @@ public class DhlServices {
             }
 
             // lookup the two letter country code (in the geoCode field)
-            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
             if (destCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestCountryGeoNotFound", 
@@ -647,8 +647,8 @@ public class DhlServices {
             // loop through Shipment segments (NOTE: only one supported, loop is here for future refactoring reference)
             BigDecimal packageWeight = null;
             for (GenericValue shipmentPackageRouteSeg: shipmentPackageRouteSegs) {
-                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
-                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
                 /*
                 List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "DHL"), null);
                 GenericValue carrierShipmentBoxType = null;
@@ -660,7 +660,7 @@ public class DhlServices {
                 // TODO: determine what default UoM is (assuming inches) - there should be a defaultDimensionUomId in Facility
                 if (shipmentBoxType != null) {
                     /*
-                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom");
+                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
                     String length = shipmentBoxType.get("boxLength").toString();
                     String width = shipmentBoxType.get("boxWidth").toString();
                     String height = shipmentBoxType.get("boxHeight").toString();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Tue May 29 04:14:02 2012
@@ -527,7 +527,7 @@ public class FedexServices {
             }
 
             // Get and validate origin postal address
-            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (UtilValidate.isEmpty(originPostalAddress)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
@@ -540,7 +540,7 @@ public class FedexServices {
                         "FacilityShipmentRouteSegmentOriginPostalAddressNotComplete",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
             if (UtilValidate.isEmpty(originCountryGeo)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginCountryGeoNotFound",
@@ -563,7 +563,7 @@ public class FedexServices {
             }
 
             // Get and validate origin telecom number
-            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
             if (UtilValidate.isEmpty(originTelecomNumber)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginTelecomNumberNotFound",
@@ -579,13 +579,13 @@ public class FedexServices {
 
             // Get the origin contact name from the owner of the origin facility
             GenericValue partyFrom = null;
-            GenericValue originFacility = shipment.getRelatedOne("OriginFacility");
+            GenericValue originFacility = shipment.getRelatedOne("OriginFacility", false);
             if (UtilValidate.isEmpty(originFacility)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentFedexOriginFacilityRequired",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             } else {
-                partyFrom = originFacility.getRelatedOne("OwnerParty");
+                partyFrom = originFacility.getRelatedOne("OwnerParty", false);
                 if (UtilValidate.isEmpty(partyFrom)) {
                     return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                             "FacilityShipmentFedexOwnerPartyRequired",
@@ -603,7 +603,7 @@ public class FedexServices {
             }
 
             // Get and validate destination postal address
-            GenericValue destinationPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destinationPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (UtilValidate.isEmpty(destinationPostalAddress)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestPostalAddressNotFound",
@@ -616,7 +616,7 @@ public class FedexServices {
                         "FacilityShipmentRouteSegmentDestPostalAddressIncomplete",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue destinationCountryGeo = destinationPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue destinationCountryGeo = destinationPostalAddress.getRelatedOne("CountryGeo", false);
             if (UtilValidate.isEmpty(destinationCountryGeo)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestCountryGeoNotFound", 
@@ -638,7 +638,7 @@ public class FedexServices {
             }
 
             // Get and validate destination telecom number
-            GenericValue destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            GenericValue destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             if (UtilValidate.isEmpty(destinationTelecomNumber)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestTelecomNumberNotFound", 
@@ -776,8 +776,8 @@ public class FedexServices {
 
             // Loop through Shipment segments (NOTE: only one supported, loop is here for future refactoring reference)
             for (GenericValue shipmentPackageRouteSeg: shipmentPackageRouteSegs) {
-                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
-                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
 
                 // FedEx requires the packaging type
                 String packaging = null;
@@ -819,7 +819,7 @@ public class FedexServices {
                     dimensionsHeight = shipmentBoxType.getBigDecimal("boxHeight");
 
                     String boxDimensionsUomId = null;
-                    GenericValue boxDimensionsUom = shipmentBoxType.getRelatedOne("DimensionUom");
+                    GenericValue boxDimensionsUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
                     if (! UtilValidate.isEmpty(boxDimensionsUom)) {
                         boxDimensionsUomId = boxDimensionsUom.getString("uomId");
                     } else {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Tue May 29 04:14:02 2012
@@ -144,12 +144,12 @@ public class UpsServices {
             }
 
             // Get Origin Info
-            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
             if (originTelecomNumber == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginTelecomNumberNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -162,20 +162,20 @@ public class UpsServices {
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
             // lookup the two letter country code (in the geoCode field)
-            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
             if (originCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginCountryGeoNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
             // Get Dest Info
-            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
-            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             if (destTelecomNumber == null) {
                 String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
                 Debug.logError(missingErrMsg, module);
@@ -194,7 +194,7 @@ public class UpsServices {
             }
 
             // lookup the two letter country code (in the geoCode field)
-            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
             if (destCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestCountryGeoNotFound", 
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -470,7 +470,7 @@ public class UpsServices {
                     BigDecimal productQuantity = shipmentItem.getBigDecimal("quantity").setScale(decimals, rounding);
                     UtilXml.addChildElementValue(unitElement, "Number", String.valueOf(productQuantity.intValue()), shipmentConfirmRequestDoc);
                     List<GenericValue> shipmentItemIssuances = shipmentItem.getRelated("ItemIssuance");
-                    GenericValue orderItem = EntityUtil.getFirst(shipmentItemIssuances).getRelatedOne("OrderItem");
+                    GenericValue orderItem = EntityUtil.getFirst(shipmentItemIssuances).getRelatedOne("OrderItem", false);
                     UtilXml.addChildElementValue(unitElement, "Value", orderItem.getBigDecimal("unitPrice").toString(), shipmentConfirmRequestDoc);
                     Element unitOfMeasurElement = UtilXml.addChildElement(unitElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
                     UtilXml.addChildElementValue(unitOfMeasurElement, "Code", "EA", shipmentConfirmRequestDoc);
@@ -487,8 +487,8 @@ public class UpsServices {
             ListIterator<GenericValue> shipmentPackageRouteSegIter = shipmentPackageRouteSegs.listIterator();
             while (shipmentPackageRouteSegIter.hasNext()) {
                 GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegIter.next();
-                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
-                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
                 List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null);
                 GenericValue carrierShipmentBoxType = null;
                 if (carrierShipmentBoxTypes.size() > 0) {
@@ -506,7 +506,7 @@ public class UpsServices {
                 if (shipmentBoxType != null) {
                     Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", shipmentConfirmRequestDoc);
                     Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
-                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom");
+                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
                     if (dimensionUom != null) {
                         UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), shipmentConfirmRequestDoc);
                     } else {
@@ -524,7 +524,7 @@ public class UpsServices {
                                                                     && UtilValidate.isNotEmpty(shipmentPackage.getBigDecimal("boxHeight"))) {
                     Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", shipmentConfirmRequestDoc);
                     Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
-                    GenericValue dimensionUom = shipmentPackage.getRelatedOne("DimensionUom");
+                    GenericValue dimensionUom = shipmentPackage.getRelatedOne("DimensionUom", false);
                     if (UtilValidate.isNotEmpty(dimensionUom)) {
                         UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), shipmentConfirmRequestDoc);
                     } else {
@@ -1738,7 +1738,7 @@ public class UpsServices {
 
         GenericValue destCountryGeo = null;
         try {
-            destCountryGeo = shipToAddress.getRelatedOne("CountryGeo");
+            destCountryGeo = shipToAddress.getRelatedOne("CountryGeo", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -2119,7 +2119,7 @@ public class UpsServices {
         UtilXml.addChildElementValue(shipperAddrElement, "PostalCode", shipFromAddress.getString("postalCode"), rateRequestDoc);
         try {
             //If the warehouse you are shipping from its located in a country other than US, you need to supply its country code to UPS
-            UtilXml.addChildElementValue(shipperAddrElement, "CountryCode", shipFromAddress.getRelatedOneCache("CountryGeo").getString("geoCode"), rateRequestDoc);
+            UtilXml.addChildElementValue(shipperAddrElement, "CountryCode", shipFromAddress.getRelatedOne("CountryGeo", true).getString("geoCode"), rateRequestDoc);
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(e.getMessage());
         }
@@ -2426,12 +2426,12 @@ public class UpsServices {
             }
 
             // Get Origin Info
-            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
             if (originTelecomNumber == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2444,20 +2444,20 @@ public class UpsServices {
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
             // lookup the two letter country code (in the geoCode field)
-            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
             if (originCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
             // Get Dest Info
-            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
-            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             if (destTelecomNumber == null) {
                 String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
                 Debug.logError(missingErrMsg, module);
@@ -2474,7 +2474,7 @@ public class UpsServices {
             }
 
             // lookup the two letter country code (in the geoCode field)
-            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
             if (destCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound", 
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2814,12 +2814,12 @@ public class UpsServices {
             }
 
             // Get Origin Info
-            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
-            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+            GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
             if (originTelecomNumber == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2832,20 +2832,20 @@ public class UpsServices {
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
             originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
             // lookup the two letter country code (in the geoCode field)
-            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
             if (originCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
             // Get Dest Info
-            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destPostalAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
             }
 
-            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             if (destTelecomNumber == null) {
                 String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
                 Debug.logError(missingErrMsg, module);
@@ -2864,7 +2864,7 @@ public class UpsServices {
             }
 
             // lookup the two letter country code (in the geoCode field)
-            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+            GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
             if (destCountryGeo == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound", 
                         UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2966,8 +2966,8 @@ public class UpsServices {
             }
             for (GenericValue shipmentPackageRouteSeg :shipmentPackageRouteSegs) {
 
-                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
-                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
                 List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null);
                 GenericValue carrierShipmentBoxType = null;
                 if (carrierShipmentBoxTypes.size() > 0) {
@@ -2985,7 +2985,7 @@ public class UpsServices {
                 if (shipmentBoxType != null) {
                     Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", rateRequestDoc);
                     Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", rateRequestDoc);
-                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom");
+                    GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
                     if (dimensionUom != null) {
                         UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), rateRequestDoc);
                     } else {

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=1343488&r1=1343487&r2=1343488&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:14:02 2012
@@ -298,7 +298,7 @@ public class UspsServices {
                             "FacilityShipmentUspsRateInternationCannotBeUsedForUsDestinations", locale));
                 }
                 if (shipToAddress != null && UtilValidate.isNotEmpty(shipToAddress.getString("countryGeoId"))) {
-                    GenericValue countryGeo = shipToAddress.getRelatedOne("CountryGeo");
+                    GenericValue countryGeo = shipToAddress.getRelatedOne("CountryGeo", false);
                     // TODO: Test against all country geoNames against what USPS expects
                     destinationCountry = countryGeo.getString("geoName");
                 }
@@ -949,7 +949,7 @@ public class UspsServices {
             }
 
             // get the origin address
-            GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginPostalAddressNotFound", 
@@ -968,7 +968,7 @@ public class UspsServices {
             }
 
             // get the destination address
-            GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destinationAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestPostalAddressNotFound", 
@@ -1036,7 +1036,7 @@ public class UspsServices {
                 UtilXml.addChildElementValue(packageElement, "ZipDestination", destinationZip, requestDocument);
 
                 GenericValue shipmentPackage = null;
-                shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
+                shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
 
                 // weight elements - Pounds, Ounces
                 String weightStr = shipmentPackage.getString("weight");
@@ -1256,7 +1256,7 @@ public class UspsServices {
             }
 
             // get the origin address
-            GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+            GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
             if (originAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentOriginPostalAddressNotFound", 
@@ -1269,7 +1269,7 @@ public class UspsServices {
             }
             
             // get the destination address
-            GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destinationAddress == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "FacilityShipmentRouteSegmentDestPostalAddressNotFound", 
@@ -1343,7 +1343,7 @@ public class UspsServices {
                 UtilXml.addChildElementValue(requestElement, "ToZip5", destinationAddress.getString("postalCode"), requestDocument);
                 UtilXml.addChildElement(requestElement, "ToZip4", requestDocument);
 
-                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
+                GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
                 
                 // WeightInOunces
                 String weightStr = shipmentPackage.getString("weight");
@@ -1499,14 +1499,14 @@ public class UspsServices {
         GenericValue destinationTelecomNumber = null;
         List<GenericValue> shipmentPackageRouteSegs = null;
         try {
-            originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
-            originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
-            destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+            originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
+            originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
+            destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
             if (destinationAddress != null) {
-                destinationProvince = destinationAddress.getRelatedOne("StateProvinceGeo");
-                destinationCountry = destinationAddress.getRelatedOne("CountryGeo");
+                destinationProvince = destinationAddress.getRelatedOne("StateProvinceGeo", false);
+                destinationCountry = destinationAddress.getRelatedOne("CountryGeo", false);
             }
-            destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+            destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
             shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
@@ -1570,9 +1570,9 @@ public class UspsServices {
             GenericValue shipmentPackage = null;
             List<GenericValue> shipmentPackageContents = null;
             try {
-                shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
+                shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
                 shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent");
-                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+                GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
                 if (shipmentBoxType != null) {
                     GenericValue carrierShipmentBoxType = EntityUtil.getFirst(shipmentBoxType.getRelatedByAnd("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "USPS")));
                     if (carrierShipmentBoxType != null) {
@@ -1622,9 +1622,9 @@ public class UspsServices {
                 GenericValue product = null;
                 GenericValue originGeo = null;
                 try {
-                    GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem");
-                    product = shipmentItem.getRelatedOne("Product");
-                    originGeo = product.getRelatedOne("OriginGeo");
+                    GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem", false);
+                    product = shipmentItem.getRelatedOne("Product", false);
+                    originGeo = product.getRelatedOne("OriginGeo", false);
                 } catch (GenericEntityException e) {
                     Debug.logInfo(e, module);
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Tue May 29 04:14:02 2012
@@ -112,7 +112,7 @@ public class VerifyPickSession implement
 
             for (GenericValue reservation : reservations) {
                 if (qtyRemain.compareTo(ZERO) > 0) {
-                    if (!productId.equals(reservation.getRelatedOne("InventoryItem").getString("productId"))) {
+                    if (!productId.equals(reservation.getRelatedOne("InventoryItem", false).getString("productId"))) {
                         continue;
                     }
                     BigDecimal reservedQty = reservation.getBigDecimal("quantity");

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Tue May 29 04:14:02 2012
@@ -34,7 +34,7 @@ List separateRootType(roots) {
         prodRootTypeTree = [];
         roots.each { root ->
             prodCateMap = [:];
-            productCategory = root.getRelatedOne("ProductCategory");
+            productCategory = root.getRelatedOne("ProductCategory", false);
             prodCateMap.productCategoryId = productCategory.getString("productCategoryId");
             prodCateMap.categoryName = productCategory.getString("categoryName");
             prodCateMap.isCatalog = false;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy Tue May 29 04:14:02 2012
@@ -21,13 +21,13 @@ import org.ofbiz.base.util.*
 import org.ofbiz.base.util.string.*
 
 if (productCategory) {
-    context.productCategoryType = productCategory.getRelatedOne("ProductCategoryType");
+    context.productCategoryType = productCategory.getRelatedOne("ProductCategoryType", false);
 }
 
 primaryParentCategory = null;
 primParentCatIdParam = request.getParameter("primaryParentCategoryId");
 if (productCategory) {
-    primaryParentCategory = productCategory.getRelatedOne("PrimaryParentProductCategory");
+    primaryParentCategory = productCategory.getRelatedOne("PrimaryParentProductCategory", false);
 } else if (primParentCatIdParam) {
     primaryParentCategory = delegator.findOne("ProductCategory", [productCategoryId : primParentCatIdParam], false);
 }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy Tue May 29 04:14:02 2012
@@ -42,7 +42,7 @@ context.productContent = productContent;
 
 productContentDatas = [];
 productContent.each { productContent ->
-    content = productContent.getRelatedOne("Content");
+    content = productContent.getRelatedOne("Content", false);
     productContentDatas.add([productContent : productContent, content : content]);
 }
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy Tue May 29 04:14:02 2012
@@ -57,9 +57,9 @@ if (contentId) {
 //Assume it is a generic simple text content
 textData = [:];
 if (contentId && content) {
-    textDr = content.getRelatedOne("DataResource");
+    textDr = content.getRelatedOne("DataResource", false);
     if (textDr) {
-        text = textDr.getRelatedOne("ElectronicText");
+        text = textDr.getRelatedOne("ElectronicText", false);
         if (text) {
             textData.text = text.textData;
             textData.textDataResourceId = text.dataResourceId;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy?rev=1343488&r1=1343487&r2=1343488&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy Tue May 29 04:14:02 2012
@@ -31,7 +31,7 @@ if (productFeatureGroupId) {
     productFeatureGroupAppls = productFeatureGroup.getRelated("ProductFeatureGroupAppl", ['sequenceNum']);
     for (pFGAi = productFeatureGroupAppls.iterator(); pFGAi;) {
         productFeatureGroupAppl = (GenericEntity)pFGAi.next();
-        productFeature = (GenericEntity)productFeatureGroupAppl.getRelatedOne("ProductFeature");
+        productFeature = (GenericEntity)productFeatureGroupAppl.getRelatedOne("ProductFeature", false);
         productFeature.set("defaultSequenceNum", productFeatureGroupAppl.getLong("sequenceNum"));
         productFeatures.add(productFeature);
     }