com.ibm.commerce.marketing.databeans

Class CouponListByUserDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, Delegator, java.io.Serializable


    public class CouponListByUserDataBean
    extends SmartDataBeanImpl
    implements Delegator

    This databean lists all the coupons possessed by the Shopper.

    Before invoking the populate method on this bean you must invoke the following methods:

                    setMemberId
                    setState (-1 for all, 0 for active, 1 for cancelled, 2 for beingused, 3 
                for expired, 4 for deleted)
     

    Optionally, the following methods can be invoked:

                    setUserIdentifier (Used to set a token for a guest shopper. This token 
                uniquely identifies the guest shopper.)
     
    See Also:
    Serialized Form
    • Constructor Detail

      • CouponListByUserDataBean

        public CouponListByUserDataBean()
        Constructor
    • Method Detail

      • setCommandContext

        public void setCommandContext(CommandContext cc)
        Sets the command context associated with the data bean. This is called by the DataBeanManager during the activate method.
        Specified by:
        setCommandContext in interface SmartDataBean
        Overrides:
        setCommandContext in class SmartDataBeanImpl
        Parameters:
        cc - The command context passed to the JSP page that invokes this data bean.
      • setRequestProperties

        public void setRequestProperties(TypedProperty param)
        Sets the request properties associated with the data bean. This is called by the DataBeanManager during the activate method.
        Specified by:
        setRequestProperties in interface InputDataBean
        Overrides:
        setRequestProperties in class InputDataBeanImpl
        Parameters:
        param - The set of properties passed to the JSP page that invokes this data bean.
      • setMemberId

        public void setMemberId(java.lang.Long _memberId)
        Sets the member ID of the user.
        Parameters:
        _memberId - Member ID of the user for whom a list of coupons is retrieved.
      • setState

        public void setState(int _state)
        Sets the state
        Parameters:
        _state - The new state
      • setUserIdentifier

        public void setUserIdentifier(java.lang.String _userIdentifier)
        This methods sets the user identifier for a guest user.
        Parameters:
        _userIdentifier - The user's identifier.
      • getCoupons

        public com.ibm.commerce.marketing.promotion.coupon.Coupon[] getCoupons()
        Returns a list of retrieved coupons
        Returns:
        A list of retrieved coupons.
      • getDelegate

        public Protectable getDelegate()
                                throws java.lang.Exception
        Returns the user data bean with the member id set.
        Specified by:
        getDelegate in interface Delegator
        Returns:
        The user data bean.
        Throws:
        java.lang.Exception - when an error is encountered on getting the user data bean.
        See Also:
        Delegator.getDelegate()