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:10:38 UTC

svn commit: r1343474 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/finaccount/ applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/ framework/common/webcommon/includes/

Author: doogie
Date: Tue May 29 04:10:37 2012
New Revision: 1343474

URL: http://svn.apache.org/viewvc?rev=1343474&view=rev
Log:
OPTIMIZE: Replace Delegator.getRelatedOne calls with
GenericValue.getRelatedOne.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
    ofbiz/trunk/framework/common/webcommon/includes/states.ftl

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1343474&r1=1343473&r2=1343474&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Tue May 29 04:10:37 2012
@@ -389,7 +389,7 @@ public class FinAccountServices {
                         // make sure there is an order available to refund
                         if (orderId != null && orderItemSeqId != null) {
                             GenericValue orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId",orderId), false);
-                            GenericValue productStore = delegator.getRelatedOne("ProductStore", orderHeader);
+                            GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
                             GenericValue orderItem = delegator.findOne("OrderItem", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId), false);
                             if (!"ITEM_CANCELLED".equals(orderItem.getString("statusId"))) {
 

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java?rev=1343474&r1=1343473&r2=1343474&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java Tue May 29 04:10:37 2012
@@ -127,7 +127,7 @@ public class OrbitalPaymentServices {
         GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
         GenericValue creditCard = null;
         try {
-            creditCard = delegator.getRelatedOne("CreditCard",orderPaymentPreference);
+            creditCard = orderPaymentPreference.getRelatedOne("CreditCard");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -173,7 +173,7 @@ public class OrbitalPaymentServices {
         GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
         GenericValue creditCard = null;
         try {
-            creditCard = delegator.getRelatedOne("CreditCard",orderPaymentPreference);
+            creditCard = orderPaymentPreference.getRelatedOne("CreditCard");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -218,7 +218,7 @@ public class OrbitalPaymentServices {
 
         GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
         try {
-            delegator.getRelatedOne("CreditCard",orderPaymentPreference);
+            orderPaymentPreference.getRelatedOne("CreditCard");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 

Modified: ofbiz/trunk/framework/common/webcommon/includes/states.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/states.ftl?rev=1343474&r1=1343473&r2=1343474&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/states.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/states.ftl Tue May 29 04:10:37 2012
@@ -29,7 +29,7 @@ under the License.
 </#if>
 
 <#list stateAssocs as stateAssoc>
-    <#assign state = delegator.getRelatedOne("AssocGeo", stateAssoc )>
+    <#assign state = stateAssoc.getRelatedOne("AssocGeo")>
     <option value='${state.geoId}'>${state.geoName?default(state.geoId)}</option>
 </#list>
 -->