Class RoundingElementCmdImpl

  • All Implemented Interfaces:
    PriceRuleElementCmd, RoundingElementCmd,,,,,,

    public class RoundingElementCmdImpl
    extends PriceRuleElementCmdImpl
    implements RoundingElementCmd
    The default implementation for the rounding element command. The most common example of this is when the customer wants all prices to end in 0.49 or 0.99. In this case, the "tenth" digit should round up to whichever is closest, 4 or 9. The "hundredth" digit should always become 9. In this example: For example,
  • 9.95 becomes 9.99
  • 3.58 becomes 3.99
  • 2.16 becomes 2.49
See Also:
Serialized Form
    • Field Detail


        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values

        public static final java.lang.String CLASSNAME
        The name of this class.
        See Also:
        Constant Field Values

        public static final java.lang.String ATTR_ROUNDING_PATTERN
        The key for rounding patterns in DB and noun.
        See Also:
        Constant Field Values

        public static final java.lang.String ATTR_DEFINING_CURRENCY_CODES
        The key for rounding currencies in DB and noun.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RoundingElementCmdImpl

        public RoundingElementCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        The main logic to execute the command.
        Specified by:
        performExecute in interface
        performExecute in class PriceRuleElementCmdImpl
      • validateParameters

        public java.util.List validateParameters(java.util.Map elementParameters)
        This method performs validations. This value can be null of no errors.
        Specified by:
        validateParameters in interface PriceRuleElementCmd
        validateParameters in class PriceRuleElementCmdImpl
        elementParameters -
        A list which contains all validation errors.This value will be null if no errors found.