com.ibm.commerce.couponwallet.databeans
Class ViewWalletDataBean

java.lang.Object
  |
  +--com.ibm.commerce.couponwallet.databeans.ViewWalletDataBean
All Implemented Interfaces:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean, ViewWalletInputDataBean

public class ViewWalletDataBean
extends java.lang.Object
implements ViewWalletInputDataBean, SmartDataBean

This data bean is used to view the eCoupon in the customer's wallet. It provides the list of coupons for which the status and storeId are as specified by the parameters and the product specified by the productId is part of the purchase condition. If the productId is -1 then all the eCoupon for this store in the specified state for this user are shown.

The input parameter for this data bean are :

This can be queried for number of eCoupons and the information relating to eCoupons can be obtained by calling the function getCouponInfo. This function return a CouponInfo object. This object contain the following fields :

See Also:
Serialized Form

Field Summary
 java.lang.Long categoryId
          The category for which the applicable coupons are being returned.
  CommandContext commandContext
          The command context.
 java.util.Vector couponInfo
          The information for each coupon is stored in this object.
 int numCoupons
          The number of coupons being returned.
 java.lang.Long productId
          The product for which the applicable coupons are being returned.
 java.lang.Long shopperId
          The customer who's coupons are being displayed.
 java.lang.String state
          The desired state of the coupons to be shown.
 java.lang.Integer storeId
          The store for which the coupons are being shown.
 
Fields inherited from interface com.ibm.commerce.couponwallet.databeans. ViewWalletInputDataBean
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Fields inherited from interface com.ibm.commerce.beans. SmartDataBean
COPYRIGHT
 
Constructor Summary
ViewWalletDataBean()
          ViewWalletDatabean constructor call super.
 
Method Summary
 boolean forThisStore( CouponPromotionAccessBean newpAB, java.lang.Integer newStoreId)
          This method identifies the eCoupon for the store applied for.
 java.lang.Long getBcId(int i)
          Gets the ID of the eCoupon.
 java.lang.Long getCategoryId()
          Gets the category for which the applicable coupons are being found out.
  CommandContext getCommandContext()
          Gets the context of the command.
  CouponInfo getCouponInfo(int i)
          Gets the information about the eCoupon.
 int getNumCoupons()
          Gets the number of eCoupons applicable for the products.
  TypedProperty getRequestProperties()
          Gets the properties of the request.
 java.lang.Long getShopperId()
          Gets ID of the customer.
 void populate()
          This method populates the data bean that is used to view the eCoupon in the customer's wallet.
 void setCategoryId(java.lang.Long newCategoryId)
          Sets the category for which the applicable coupons are being found out.
 void setCommandContext( CommandContext newCommandContext)
          Sets the context of the command.
 void setNumCoupons(int newNumCoupons)
          Sets the number of eCoupons applied for the products.
 void setProductId(java.lang.Long newProductId)
          Sets the ID of the product.
 void setRequestProperties( TypedProperty typeProp)
          Sets the properties of the request.
 void setShopperId(java.lang.Long newShopperId)
          Sets the ID of the customer.
 void setState(java.lang.String newState)
          Sets the state of the eCoupon.
 void setStoreId(java.lang.Integer newStoreId)
          Sets the ID of the store.
 void setValues( CouponWalletAccessBean tempcwAB, CouponPromotionAccessBean temppAB)
          Sets the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

public java.lang.String state
The desired state of the coupons to be shown.

couponInfo

public java.util.Vector couponInfo
The information for each coupon is stored in this object.

numCoupons

public int numCoupons
The number of coupons being returned.

productId

public java.lang.Long productId
The product for which the applicable coupons are being returned.

storeId

public java.lang.Integer storeId
The store for which the coupons are being shown.

commandContext

public CommandContext commandContext
The command context.

shopperId

public java.lang.Long shopperId
The customer who's coupons are being displayed.

categoryId

public java.lang.Long categoryId
The category for which the applicable coupons are being returned.
Constructor Detail

ViewWalletDataBean

public ViewWalletDataBean()
ViewWalletDatabean constructor call super.
Method Detail

forThisStore

public boolean forThisStore(CouponPromotionAccessBean newpAB,
                            java.lang.Integer newStoreId)
This method identifies the eCoupon for the store applied for.
Parameters:
newStoreId - java.lang.Integer
Returns:
java.lang.Boolean

getBcId

public java.lang.Long getBcId(int i)
Gets the ID of the eCoupon.
Returns:
java.lang.String[]

getCategoryId

public java.lang.Long getCategoryId()
Gets the category for which the applicable coupons are being found out.
Returns:
long

getCommandContext

public CommandContext getCommandContext()
Gets the context of the command.
Specified by:
getCommandContext in interface SmartDataBean
Returns:
com.ibm.commerce.command.CommandContext

getCouponInfo

public CouponInfo getCouponInfo(int i)
Gets the information about the eCoupon.
Returns:
com.ibm.commerce.couponwallet.databeans.CouponInfo

getNumCoupons

public int getNumCoupons()
Gets the number of eCoupons applicable for the products.
Returns:
int

getRequestProperties

public TypedProperty getRequestProperties()
Gets the properties of the request.
Specified by:
getRequestProperties in interface InputDataBean
Returns:
com.ibm.commerce.datatype.TypedProperty

getShopperId

public java.lang.Long getShopperId()
Gets ID of the customer.
Returns:
java.lang.Long

populate

public void populate()
This method populates the data bean that is used to view the eCoupon in the customer's wallet.
Specified by:
populate in interface SmartDataBean
Throws:
javax.naming.NamingException
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException

setCategoryId

public void setCategoryId(java.lang.Long newCategoryId)
Sets the category for which the applicable coupons are being found out.
Parameters:
newCategoryId - long

setCommandContext

public void setCommandContext(CommandContext newCommandContext)
Sets the context of the command.
Specified by:
setCommandContext in interface SmartDataBean
Parameters:
newCommandContext - com.ibm.commerce.command.CommandContext

setNumCoupons

public void setNumCoupons(int newNumCoupons)
Sets the number of eCoupons applied for the products.
Parameters:
newNumCoupons - int

setProductId

public void setProductId(java.lang.Long newProductId)
Sets the ID of the product.
Parameters:
newProductId - int

setRequestProperties

public void setRequestProperties(TypedProperty typeProp)
Sets the properties of the request.
Specified by:
setRequestProperties in interface InputDataBean
Parameters:
typeProp - com.ibm.commerce.datatype.TypedProperty

setShopperId

public void setShopperId(java.lang.Long newShopperId)
Sets the ID of the customer.
Parameters:
newShopperId - java.lang.Long

setState

public void setState(java.lang.String newState)
Sets the state of the eCoupon.
Parameters:
newState - java.lang.String

setStoreId

public void setStoreId(java.lang.Integer newStoreId)
Sets the ID of the store.
Parameters:
newStoreId - java.lang.Integer

setValues

public void setValues(CouponWalletAccessBean tempcwAB,
CouponPromotionAccessBean temppAB)
               throws java.lang.Exception
Sets the values.
java.lang.Exception