com.ibm.commerce.price.commands

Class DeleteNominalCostCmdImpl

  • 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.price.commands.DeleteNominalCostCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, DeleteNominalCostCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class DeleteNominalCostCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements DeleteNominalCostCmd
    This DeleteNominalCostCmdImpl Task Command Implementation is used to delete the nominal cost of a product.

    Behaviour

    • If currency provided, delete the specific entry in OFFERPRICE table; then check if there are more offerprices (with other currencies) associated with offer ID, if yes, leave the offer entry undeleted; otherwise, delete the offer entry in OFFER table.
    • If no currency specified, delete the offer entry in OFFER table, and remove all entries in OFFERPRICE table with the given offer ID;

    This command uses the following AccessBeans:

    • OfferAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getStoreId()
      Returns the store ID.
      void performExecute()
      First validates the input parameters; Second check if there exists a nominal cost, if no, throw ECException; Then remove the records in OFFER and OFFERPRICE tables in a single transaction.
      void reset() 
      void setCatEntryId(java.lang.Long aCatEntryID)
      Sets the catalog entry ID whose nominal cost to be deleted.
      void setStoreId(java.lang.Integer aStoreId)
      Set the store ID to which the catalog entry belongs.
      void validateParameters() 
      • 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, getUser, getUserId, isReadyToCallExecute, 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, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • COPYRIGHT

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

      • DeleteNominalCostCmdImpl

        public DeleteNominalCostCmdImpl()
    • Method Detail

      • getStoreId

        public java.lang.Integer getStoreId()
        Returns the store ID.
        Specified by:
        getStoreId in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getStoreId in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        Integer
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        First validates the input parameters; Second check if there exists a nominal cost, if no, throw ECException; Then remove the records in OFFER and OFFERPRICE tables in a single transaction.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        throw - ECException when failure encountered.
        com.ibm.commerce.exception.ECException
      • reset

        public void reset()
        Overrides:
        reset in class com.ibm.commerce.command.AbstractECTargetableCommand
        See Also:
        com.ibm.websphere.command.Command#reset()
      • setCatEntryId

        public void setCatEntryId(java.lang.Long aCatEntryID)
        Sets the catalog entry ID whose nominal cost to be deleted.
        Specified by:
        setCatEntryId in interface DeleteNominalCostCmd
        Parameters:
        catEntryId - A reference number of catalog entry.
      • setStoreId

        public void setStoreId(java.lang.Integer aStoreId)
        Set the store ID to which the catalog entry belongs.
        Specified by:
        setStoreId in interface DeleteNominalCostCmd
        Parameters:
        storeId - A store ID
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        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
        See Also:
        ECCommand.validateParameters()