com.ibm.commerce.order.beans

Class OrderPromotionCodeDataBean

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      OrderPromotionCodeDataBean()
      OrderPromotionCodeDataBean constructor .
      OrderPromotionCodeDataBean(com.ibm.commerce.order.objects.OrderPromotionCodeAccessBean aabOrderPromotionCode)
      Constructs an OrderPromotionCodeDataBean from an OrderPromotionCodeAccessBean by extracting the Order EJB reference from the OrderPromotionCodeAccessBean.
      OrderPromotionCodeDataBean(com.ibm.commerce.order.objects.OrderPromotionCodeAccessBean aabOrderPromotionCode, CommandContext aCommandContext)
      Constructs an OrderPromotionCodeDataBean from an OrderPromotionCodeAccessBean by extracting the Order EJB reference from the OrderPromotionCodeAccessBean and setting the commandContext
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getAddOrderPromotionCode()
      This method adds the Promotion Code specified to the specified order.
      java.lang.String getCode()
      This method returns the promotion code associated with the order
      CommandContext getCommandContext()
      This method returns command context.
      java.lang.String getOrderID()
      This method returns the order id.
      java.lang.String getOrderPromotionCodeID()
      This method returns the id of the record.
      java.lang.String[] getOrderPromotionCodes()
      This method returns the Promotion Codes associated with a specified order.
      boolean getRemoveAllCodesForOrder()
      This method removes all the Promotion Codes for the specified order.
      boolean getRemoveOrderPromotionCode()
      This method removes the Promotion Code specified from the specified order.
      TypedProperty getRequestProperties()
      This method returns the request property set within this bean.
      void populate()
      This method is used to populate the OrderPromotionCodeDataBean.
      void setCode(java.lang.String string)
      This method sets the promotion code.
      void setCommandContext(CommandContext context)
      This method setsCommandContext method comment.
      void setOrderID(java.lang.String string)
      This method sets the order id that will be used to get the order promotion codes.
      void setOrderPromotionCodeID(java.lang.String string)
      This method sets the record id.
      void setRequestProperties(TypedProperty aRequestProperties)
      This method sets the request properties within this bean.
      • Methods inherited from class com.ibm.commerce.order.objects.OrderPromotionCodeAccessBean

        findByID, findByOrdersID, findByOrdersIDAndCode, findByPromotionCode, fulfills, getCODE, getEntity, getID, getORDERS_ID, getOwner, instantiateEntity, setCODE, setInitKey_ID, setORDERS_ID
      • Methods inherited from class com.ibm.commerce.persistence.AbstractJpaEntityAccessBean

        createAccessBean, createAccessBean, createAccessBeanCollection, createAccessBeanCollection, createEntityCollection, detach, remove, setUseDataCache, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

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

      • OrderPromotionCodeDataBean

        public OrderPromotionCodeDataBean()
        OrderPromotionCodeDataBean constructor .
      • OrderPromotionCodeDataBean

        public OrderPromotionCodeDataBean(com.ibm.commerce.order.objects.OrderPromotionCodeAccessBean aabOrderPromotionCode,
                                          CommandContext aCommandContext)
        Constructs an OrderPromotionCodeDataBean from an OrderPromotionCodeAccessBean by extracting the Order EJB reference from the OrderPromotionCodeAccessBean and setting the commandContext
        Parameters:
        aabOrderPromotionCode - OrderPromotionCodeAccessBean
        aCommandContext - Command Context
        Throws:
        java.lang.Exception
      • OrderPromotionCodeDataBean

        public OrderPromotionCodeDataBean(com.ibm.commerce.order.objects.OrderPromotionCodeAccessBean aabOrderPromotionCode)
        Constructs an OrderPromotionCodeDataBean from an OrderPromotionCodeAccessBean by extracting the Order EJB reference from the OrderPromotionCodeAccessBean. Note: Consider using OrderPromotionCodeDataBean(OrderPromotionCodeAccessBean aabOrderPromotionCode,CommandContext aCommandContext) if commandContext is available.
        Parameters:
        aabOrderPromotionCode - OrderPromotionCodeAccessBean
        Throws:
        java.lang.Exception
    • Method Detail

      • setCommandContext

        public void setCommandContext(CommandContext context)
        This method setsCommandContext method comment.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        context - CommandContext
      • getRequestProperties

        public TypedProperty getRequestProperties()
        This method returns the request property set within this bean.
        Specified by:
        getRequestProperties in interface InputDataBean
        Returns:
        com.ibm.commerce.datatype.TypedProperty
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
        This method sets the request properties within this bean.
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aRequestProperties - com.ibm.commerce.datatype.TypedProperty
      • populate

        public void populate()
        This method is used to populate the OrderPromotionCodeDataBean. You must set OrderPromotionCodeID using the setOrderPromotionCodeID method before running the populate() method.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception
        See Also:
        setOrderPromotionCodeID(String)
      • getCode

        public java.lang.String getCode()
        This method returns the promotion code associated with the order
        Returns:
        promotion code
      • getOrderPromotionCodeID

        public java.lang.String getOrderPromotionCodeID()
        This method returns the id of the record.
        Returns:
        id
      • getOrderID

        public java.lang.String getOrderID()
        This method returns the order id.
        Returns:
        order id
      • setCode

        public void setCode(java.lang.String string)
        This method sets the promotion code.
        Parameters:
        string - code
      • setOrderPromotionCodeID

        public void setOrderPromotionCodeID(java.lang.String string)
        This method sets the record id.
        Parameters:
        string - id
      • setOrderID

        public void setOrderID(java.lang.String string)
        This method sets the order id that will be used to get the order promotion codes.
        Parameters:
        string - order id
      • getOrderPromotionCodes

        public java.lang.String[] getOrderPromotionCodes()
        This method returns the Promotion Codes associated with a specified order.
        Returns:
        array of Order Promotion codes
      • getAddOrderPromotionCode

        public boolean getAddOrderPromotionCode()
        This method adds the Promotion Code specified to the specified order. Call method setOrderID to set order ID and method setCode to set promotion code before this method.
        Returns:
        boolean true if successful, false otherwise
      • getRemoveOrderPromotionCode

        public boolean getRemoveOrderPromotionCode()
        This method removes the Promotion Code specified from the specified order. Call method setOrderID to set order ID and method setCode to set promotion code before this method.
        Returns:
        boolean true if successful, false otherwise
      • getRemoveAllCodesForOrder

        public boolean getRemoveAllCodesForOrder()
        This method removes all the Promotion Codes for the specified order. Call method setOrderID to set the order ID before this method.
        Returns:
        boolean true if successful, false otherwise