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.)
emptyString
Constructor and Description |
---|
CouponListByUserDataBean()
Constructor
|
Modifier and Type | Method and Description |
---|---|
com.ibm.commerce.marketing.promotion.coupon.Coupon[] |
getCoupons()
Returns a list of retrieved coupons
|
Protectable |
getDelegate()
Returns the user data bean with the member id set.
|
void |
populate()
Loads data into the databean when the
DataBeanmanager.activate() runs. |
void |
setCommandContext(CommandContext cc)
Sets the command context associated with the data bean.
|
void |
setMemberId(java.lang.Long _memberId)
Sets the member ID of the user.
|
void |
setRequestProperties(TypedProperty param)
Sets the request properties associated with the data bean.
|
void |
setState(int _state)
Sets the state
|
void |
setUserIdentifier(java.lang.String _userIdentifier)
This methods sets the user identifier for a guest user.
|
fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
getRequestProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRequestProperties
public void setCommandContext(CommandContext cc)
DataBeanManager
during the activate method.setCommandContext
in interface SmartDataBean
setCommandContext
in class SmartDataBeanImpl
cc
- The command context passed to the JSP page that invokes this
data bean.public void setRequestProperties(TypedProperty param)
DataBeanManager
during the activate method.setRequestProperties
in interface InputDataBean
setRequestProperties
in class InputDataBeanImpl
param
- The set of properties passed to the JSP page that invokes this
data bean.public void setMemberId(java.lang.Long _memberId)
_memberId
- Member ID of the user for whom a list of coupons is
retrieved.public void setState(int _state)
_state
- The new statepublic void setUserIdentifier(java.lang.String _userIdentifier)
_userIdentifier
- The user's identifier.public void populate() throws java.lang.Exception
DataBeanmanager.activate()
runs.populate
in interface SmartDataBean
populate
in class SmartDataBeanImpl
java.lang.Exception
- when an error is encountered.SmartDataBean.populate()
public com.ibm.commerce.marketing.promotion.coupon.Coupon[] getCoupons()
public Protectable getDelegate() throws java.lang.Exception
getDelegate
in interface Delegator
java.lang.Exception
- when an error is encountered on getting the user data bean.Delegator.getDelegate()