Allow optimizeForLargeRuleSet to be specified when calling

calculateProductPrice; previously, it was always hard-coded to false.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2010-11-30 22:04:11 +00:00
parent 6cf143c8db
commit f0cd365956
2 changed files with 2 additions and 2 deletions
@@ -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"
@@ -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");