com.ibm.commerce.price.rule.commands.element

Class RoundingElementCmdImpl

  • All Implemented Interfaces:
    PriceRuleElementCmd, RoundingElementCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    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

      • COPYRIGHT

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

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

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

        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 com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class PriceRuleElementCmdImpl
        Throws:
        java.lang.Exception
      • 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
        Overrides:
        validateParameters in class PriceRuleElementCmdImpl
        Parameters:
        elementParameters -
        Returns:
        A list which contains all validation errors.This value will be null if no errors found.