svn commit: r1040803 - in /ofbiz/trunk/applications/product: servicedef/services_pricepromo.xml src/org/ofbiz/product/price/PriceServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1040803 - in /ofbiz/trunk/applications/product: servicedef/services_pricepromo.xml src/org/ofbiz/product/price/PriceServices.java

doogie-3
Author: doogie
Date: Tue Nov 30 22:04:11 2010
New Revision: 1040803

URL: http://svn.apache.org/viewvc?rev=1040803&view=rev
Log:
Allow optimizeForLargeRuleSet to be specified when calling
calculateProductPrice; previously, it was always hard-coded to false.

Modified:
    ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml
    ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java

Modified: ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml?rev=1040803&r1=1040802&r2=1040803&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml Tue Nov 30 22:04:11 2010
@@ -63,6 +63,7 @@ under the License.
                 each Map in the List will also contain a field called "quantityProductPriceRule" with the GenericValue object representing the ProductPriceRule with the quantity condition that the List entry is based on
             -->
         </attribute>
+        <attribute name="optimizeForLargeRuleSet" type="String" mode="IN" optional="true"/>
     </service>
 
     <service name="createProductPriceRule" default-entity-name="ProductPriceRule" engine="simple"

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=1040803&r1=1040802&r2=1040803&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 Nov 30 22:04:11 2010
@@ -76,8 +76,6 @@ public class PriceServices {
      * </ul>
      */
     public static Map<String, Object> calculateProductPrice(DispatchContext dctx, Map<String, ? extends Object> context) {
-        boolean optimizeForLargeRuleSet = false;
-
         // UtilTimer utilTimer = new UtilTimer();
         // utilTimer.timerString("Starting price calc", module);
         // utilTimer.setLog(false);
@@ -97,6 +95,7 @@ public class PriceServices {
 
         String findAllQuantityPricesStr = (String) context.get("findAllQuantityPrices");
         boolean findAllQuantityPrices = "Y".equals(findAllQuantityPricesStr);
+        boolean optimizeForLargeRuleSet = "Y".equals(context.get("optimizeForLargeRuleSet"));
 
         String agreementId = (String) context.get("agreementId");