com.ibm.commerce.contract.commands

Class RetrievePriceRuleCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.contract.commands.RetrievePriceRuleCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, RetrievePriceRuleCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class RetrievePriceRuleCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements RetrievePriceRuleCmd
    The default implementation of command com.ibm.commerce.contract.commands.RetrievePriceRuleCmd. After price rule feature has been enabled, this command is registered in the command registry as the default implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getPriceRuleId()
      Gets the retrieved price rule Id.
      void performExecute()
      Performs the main logic to retrieve the price rule.
      void setContractId(java.lang.Long contractId)
      Sets the contract Id.
      void setEffectiveTime(java.sql.Timestamp effectiveTime)
      Sets the effective time of the price rule.
      void setMemberId(java.lang.Long memberId)
      Sets the member Id.
      void validateParameters()
      Validate the parameters.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • CLASSNAME

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

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

      • RetrievePriceRuleCmdImpl

        public RetrievePriceRuleCmdImpl()
    • Method Detail

      • getPriceRuleId

        public java.lang.Long getPriceRuleId()
        Gets the retrieved price rule Id.
        Specified by:
        getPriceRuleId in interface RetrievePriceRuleCmd
        Returns:
        The retrieved price rule Id. null is returned is no price rule retrieved.
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Performs the main logic to retrieve the price rule.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - Throws exception if errors occurred.
      • setContractId

        public void setContractId(java.lang.Long contractId)
        Sets the contract Id.
        Specified by:
        setContractId in interface RetrievePriceRuleCmd
        Parameters:
        contractId - The contract Id. Cannot be null or empty.
      • setEffectiveTime

        public void setEffectiveTime(java.sql.Timestamp effectiveTime)
        Sets the effective time of the price rule.
        Specified by:
        setEffectiveTime in interface RetrievePriceRuleCmd
        Parameters:
        effectiveTime - The effective time of the price rule. If null, the current time is used.
      • setMemberId

        public void setMemberId(java.lang.Long memberId)
        Sets the member Id.
        Specified by:
        setMemberId in interface RetrievePriceRuleCmd
        Parameters:
        memberId - The member Id. If null, the member Id in the business context is used.
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Validate the parameters.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - If contract Id is not set, exception is thrown.