public class CalculationRuleCalculateCmdImpl extends CalculationCmdImpl implements CalculationRuleCalculateCmd
The default implementation of CalculationRuleCalculateCmd.
Its behavior is as follows:
Commands used:
Access beans used:Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Constructor and Description |
---|
CalculationRuleCalculateCmdImpl()
Constructor for CalculationRuleCalculateCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
protected void | applyOrderItemLevelParameters(java.math.BigDecimal[] adValues, DirectAttachmentHelper aDirectAttachmentHelper)
Applies the parametrized
|
protected void | applyOrderLevelParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights, DirectAttachmentHelper aDirectAttachmentHelper, java.lang.Long anOrderId)
Applies the parametrized order level direct attachments (see ORDCALCD) associated with the calculation rule to a list of values.
|
protected void | applyParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights)
Applies the parametrized direct attachments associated with the calculation rule to a list of values.
|
protected java.math.BigDecimal | callRange(CalculationRangeAccessBean aabRange, CalculationRangeLookupResultAccessBean aabLookupResult, java.math.BigDecimal adApplicableLookupNumber, java.math.BigDecimal adApplicableBaseMonetaryValue)
Invokes the calculation method of type "CalculationRange" referenced by the calculation range (see CALRANGE.CALMETHOD_ID, CalculationRangeCmd) to calculate the resulting value.
|
protected CalculationScaleLookupCmd | callScaleLookup(CalculationScaleAccessBean aabScale)
Invokes the calculation method of type "CalculationScaleLookup" referenced by the calculation scale (see CALSCALE.CALMETHOD_ID, CalculationScaleLookupCmd) to determine a lookup number, a base monetary value, a result multiplier and a list of mathematical weights.
|
protected void | compareValues()
Merges the resulting lists of values of the calculation scales by currency and selects the merged list with the lowest total value.
|
protected Item[] | getItems()
Returns the items.
|
protected CalculationRuleAccessBean | getRule()
Returns the calculation rule.
|
protected java.util.Set | getScaleCurrencies(CalculationScaleAccessBean[] aabScales)
Retrieves the set of currencies referenced by a list of calculation scales.
|
java.math.BigDecimal[] | getValues()
Returns the values corresponding to the items.
|
protected java.math.BigDecimal[] | getValues(java.lang.String astrCurrency)
Returns the merged list of values of a currency.
|
protected boolean | isEffective(CalculationScaleAccessBean aabScale)
Returns whether a calculation scale is effective.
|
void | performExecute()
This method performs the business logic for this command.
|
void | reset()
Resets the command properties.
|
protected java.math.BigDecimal[] | scaleCalculate(CalculationScaleAccessBean aabScale)
Calculates the resulting list of values of a calculation scale.
|
void | setItems(Item[] aItems)
Sets the items.
|
void | setRule(CalculationRuleAccessBean aabRule)
Sets the calculation rule.
|
protected void | setValues(java.math.BigDecimal[] adValues)
Sets the values.
|
protected void | setValues(java.lang.String astrCurrency, java.math.BigDecimal[] adValues)
Sets the merged list of values of a currency.
|
public static final java.lang.String COPYRIGHT
public CalculationRuleCalculateCmdImpl()
public void reset()
protected void applyOrderItemLevelParameters(java.math.BigDecimal[] adValues, DirectAttachmentHelper aDirectAttachmentHelper) throws ECException
orderitemlevel direct attachments (see ORDICALCD) associated with the calculation rule to a list of values. This method is called by applyParameters(BigDecimal[], BigDecimal[]).
protected void applyOrderLevelParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights, DirectAttachmentHelper aDirectAttachmentHelper, java.lang.Long anOrderId) throws ECException
protected void applyParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights) throws ECException
protected java.math.BigDecimal callRange(CalculationRangeAccessBean aabRange, CalculationRangeLookupResultAccessBean aabLookupResult, java.math.BigDecimal adApplicableLookupNumber, java.math.BigDecimal adApplicableBaseMonetaryValue) throws ECException
protected CalculationScaleLookupCmd callScaleLookup(CalculationScaleAccessBean aabScale) throws ECException
protected void compareValues() throws ECException
protected Item[] getItems()
protected CalculationRuleAccessBean getRule()
protected java.util.Set getScaleCurrencies(CalculationScaleAccessBean[] aabScales) throws ECException
public java.math.BigDecimal[] getValues()
protected java.math.BigDecimal[] getValues(java.lang.String astrCurrency)
public void performExecute() throws ECException
protected boolean isEffective(CalculationScaleAccessBean aabScale) throws ECException
protected java.math.BigDecimal[] scaleCalculate(CalculationScaleAccessBean aabScale) throws ECException
public void setItems(Item[] aItems)
public void setRule(CalculationRuleAccessBean aabRule)
protected void setValues(java.math.BigDecimal[] adValues)
protected void setValues(java.lang.String astrCurrency, java.math.BigDecimal[] adValues)