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

Class PriceEquationCalculationCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.TargetableCommandImpl
      • com.ibm.websphere.command.CacheableCommandImpl
        • com.ibm.commerce.price.rule.commands.element.PriceEquationCalculationCmdImpl
  • All Implemented Interfaces:
    PriceEquationCalculationCmd, 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 PriceEquationCalculationCmdImpl
    extends com.ibm.websphere.command.CacheableCommandImpl
    implements PriceEquationCalculationCmd
    This command is the default implementation of interface PriceEquationCalculationCmd.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of this class.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

        LOCAL
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCatentryId()
      Get the catalog entry ID.
      java.lang.String getCurrency()
      Get the currency.
      java.lang.String getExpression()
      Get the representing expression of price equation.
      boolean getFlag()
      Get the flag of getUnitOnly.
      java.math.BigDecimal getInputPrice()
      Get the input price.
      com.ibm.commerce.price.rule.runtime.objects.PriceEquationResultObject getPriceEquationResultObject()
      Get the price equation result object.
      java.lang.Double getQuantity()
      Get the quantity.
      java.lang.Integer getStoreId()
      Get the store ID.
      java.lang.String getUom()
      Get the unit of measurement.
      boolean isReadyToCallExecute()
      This method returns true.
      void performExecute()
      The main logic to execute the command.
      void setCatEntryId(java.lang.String catEntryId)
      Set the catalog entry ID.
      void setCurrency(java.lang.String currency)
      Set the currency.
      void setEquationExpression(java.lang.String expression)
      Set the representing expression of price equation.
      void setFlag(boolean flag)
      Set the flag of getUnitOnly.
      void setInputPrice(java.math.BigDecimal inputPrice)
      Set the input price.
      void setQuantity(java.lang.Double quantity)
      Set the quantity.
      void setRuntimeParameters(java.util.Map runtimeParameters)
      Set the runtime parameters from the price rule engine.
      void setStoreId(java.lang.Integer storeId)
      Set the store ID.
      void setUom(java.lang.String uom)
      Set the unit of measurement for the catalog entry.
      void validateParameters()
      Checks mandatory parameters.
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, reset, setCaller, setObjectSize, unionDependencies, updateCache
      • Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl

        getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.websphere.command.CacheableCommand

        executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
      • Methods inherited from interface com.ibm.websphere.command.Command

        execute, reset
      • Methods inherited from interface com.ibm.websphere.command.CommandCaller

        unionDependencies
    • 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
    • Constructor Detail

      • PriceEquationCalculationCmdImpl

        public PriceEquationCalculationCmdImpl()
    • Method Detail

      • getPriceEquationResultObject

        public com.ibm.commerce.price.rule.runtime.objects.PriceEquationResultObject getPriceEquationResultObject()
        Get the price equation result object.
        Specified by:
        getPriceEquationResultObject in interface PriceEquationCalculationCmd
        Returns:
        The price equation result object.
      • getInputPrice

        public java.math.BigDecimal getInputPrice()
        Get the input price.
        Returns:
        The input price.
      • getExpression

        public java.lang.String getExpression()
        Get the representing expression of price equation.
        Returns:
        The representing expression of price equation.
      • getCatentryId

        public java.lang.String getCatentryId()
        Get the catalog entry ID.
        Returns:
        The catalog entry ID.
      • getCurrency

        public java.lang.String getCurrency()
        Get the currency.
        Returns:
        The currency.
      • getStoreId

        public java.lang.Integer getStoreId()
        Get the store ID.
        Returns:
        The store ID.
      • getUom

        public java.lang.String getUom()
        Get the unit of measurement.
        Returns:
        The unit of measurement.
      • getQuantity

        public java.lang.Double getQuantity()
        Get the quantity.
        Returns:
        The quantity.
      • getFlag

        public boolean getFlag()
        Get the flag of getUnitOnly.
        Returns:
        The flag of getUnitOnly.
      • setEquationExpression

        public void setEquationExpression(java.lang.String expression)
        Set the representing expression of price equation.
        Specified by:
        setEquationExpression in interface PriceEquationCalculationCmd
        Parameters:
        expression -
      • setUom

        public void setUom(java.lang.String uom)
        Set the unit of measurement for the catalog entry.
        Specified by:
        setUom in interface PriceEquationCalculationCmd
        Parameters:
        uom -
      • setFlag

        public void setFlag(boolean flag)
        Set the flag of getUnitOnly. Set true if only retrieve the unit of the value. Set false if retrieve both the value and the unit.
        Specified by:
        setFlag in interface PriceEquationCalculationCmd
        Parameters:
        flag -
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method returns true.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Specified by:
        isReadyToCallExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Returns:
        This method returns true.This value will not be null.
      • 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
        Specified by:
        performExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Throws:
        java.lang.Exception
      • validateParameters

        public void validateParameters()
                                throws ECException
        Checks mandatory parameters. The representing expression must be passed in by calling setEquationExpression().
        Throws:
        ECException