com.ibm.commerce.couponwallet.objects
Class CouponWalletAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.couponwallet.objects.CouponWalletAccessBean
All Implemented Interfaces:
CouponWalletAccessBeanData, java.io.Serializable

public class CouponWalletAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements CouponWalletAccessBeanData

This bean provides access to the CPWALLET table.

The following is a description of this table:

This table contains the coupons that the user has accepted.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
CouponWalletAccessBean()
          Default constructor.
CouponWalletAccessBean(javax.ejb.EJBObject newCouponWalletEJB)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPWALLET table.
CouponWalletAccessBean(java.lang.Integer newPromoId, java.lang.Long newUserId, java.lang.String newState, java.lang.String newAcceptFromType)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPWALLET table.
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 CouponWalletAccessBean findByBcId(java.lang.Long aDByBcId)
          This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE T1.CPWALLET_ID = ?
 java.util.Enumeration findByCppmnId(java.lang.Integer couponPromotionId)
          This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE T1.CPPMN_ID = ?
 java.util.Enumeration findByShopperIdState(java.lang.Long userId, java.lang.String couponState)
          This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE (T1.USERS_ID = ?) AND (T1.STATE = ?)
 boolean fulfills(java.lang.Long userId, java.lang.String relation)
          This method is used for access control.
 java.lang.String getAcceptFromType()
          This method provides access to the CPWALLET.ACCEPTFROMTYPE column of DB2 type CHAR(4) NOT NULL.
 java.lang.Long getBcId()
          This method provides access to the CPWALLET.CPWALLET_ID column of DB2 type BIGINT NOT NULL.
 java.lang.String getField1()
          This method provides access to the CPWALLET.FIELD1 column of DB2 type VARCHAR(64) NULL.
 java.lang.Integer getNumUse()
          This method provides access to the CPWALLET.NUMUSE column of DB2 type INTEGER NOT NULL.
 java.lang.Long getOwner()
          thsi method is used for access control.
 java.lang.Integer getPromoId()
          This method provides access to the CPWALLET.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 java.lang.Long getShopperId()
          This method provides access to the CPWALLET.USERS_ID column of DB2 type BIGINT NOT NULL.
 java.lang.String getState()
          This method provides access to the CPWALLET.STATE column of DB2 type CHAR(4) NOT NULL.
 java.sql.Timestamp getTimeAccept()
          This method provides access to the CPWALLET.TIMEACCEPT column of DB2 type TIMESTAMP NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setAcceptFromType(java.lang.String acceptanceMethod)
          This method provides access to the CPWALLET.ACCEPTFROMTYPE column of DB2 type CHAR(4) NOT NULL.
 void setBcId(java.lang.Long couponId)
          This method provides access to the CPWALLET.CPWALLET_ID column of DB2 type BIGINT NOT NULL.
 void setField1(java.lang.String field1)
          This method provides access to the CPWALLET.FIELD1 column of DB2 type VARCHAR(64) NULL.
 void setInitKey_bcId(java.lang.Long couponId)
          Set the primary key for this object
 void setNumUse(java.lang.Integer numTimesCouponUsed)
          This method provides access to the CPWALLET.NUMUSE column of DB2 type INTEGER NOT NULL.
 void setPromoId(java.lang.Integer couponPromotionId)
          This method provides access to the CPWALLET.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 void setShopperId(java.lang.Long shopperId)
          This method provides access to the CPWALLET.USERS_ID column of DB2 type BIGINT NOT NULL.
 void setState(java.lang.String couponState)
          This method provides access to the CPWALLET.STATE column of DB2 type CHAR(4) NOT NULL.
 void setTimeAccept(java.sql.Timestamp timeOfAdditionToWallet)
          This method provides access to the CPWALLET.TIMEACCEPT column of DB2 type TIMESTAMP NULL.
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
__getCache, __getCache, __getKey, __setCache, __setCache, __setKey, commitCopyHelper, createAccessBeans, createAccessBeans, instantiateEJBByPrimaryKey, refreshCopyHelper, setEJBRef
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
defaultJNDIName, defaultNameServiceType, defaultNameServiceURL, getEJBRef, getGlobalHome, getHome, getInit_GlobalNameServiceTypeName, getInit_GlobalNameServiceURLName, getInit_JNDIName, getInit_NameServiceTypeName, getInit_NameServiceURLName, getInitContext, getInitContext, instantiateEJB, resetEJBRef, resetHomeCache, setInit_GlobalNameServiceTypeName, setInit_GlobalNameServiceURLName, setInit_JNDIName, setInit_NameServiceTypeName, setInit_NameServiceURLName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouponWalletAccessBean

public CouponWalletAccessBean()

Default constructor. Maps to findByPrimaryKey.


CouponWalletAccessBean

public CouponWalletAccessBean(javax.ejb.EJBObject newCouponWalletEJB)
                       throws java.rmi.RemoteException

Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPWALLET table.

Parameters:
newCouponWalletEJB - The coupon wallet EJB.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

CouponWalletAccessBean

public CouponWalletAccessBean(java.lang.Integer newPromoId,
                              java.lang.Long newUserId,
                              java.lang.String newState,
                              java.lang.String newAcceptFromType)
                       throws javax.naming.NamingException,
                              javax.ejb.CreateException,
                              java.rmi.RemoteException,
                              javax.ejb.FinderException

Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPWALLET table.

Parameters:
newPromoId - The coupon promotion Id.
newUserId - The user Id.
newState - The state of the coupon.
newAcceptFromType - The accept type (banner Ad or e-mail or offerlist).
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
Method Detail

commitCopyHelper

public void commitCopyHelper()
                      throws java.rmi.RemoteException,
                             javax.ejb.CreateException,
                             javax.ejb.FinderException,
                             javax.naming.NamingException

Update(flush) data to the EJBObject (persistent storage).

Overrides:
commitCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByBcId

public CouponWalletAccessBean findByBcId(java.lang.Long aDByBcId)
                                  throws java.rmi.RemoteException,
                                         javax.ejb.FinderException,
                                         javax.naming.NamingException

This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE T1.CPWALLET_ID = ?

Parameters:
couponId - The coupon Id.
Returns:
The row from CPWALLET table.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByCppmnId

public java.util.Enumeration findByCppmnId(java.lang.Integer couponPromotionId)
                                    throws java.rmi.RemoteException,
                                           javax.ejb.FinderException,
                                           javax.naming.NamingException

This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE T1.CPPMN_ID = ?

Parameters:
couponPromotionId - The coupon promotion id.
Returns:
The rows from CPWALLET table.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByShopperIdState

public java.util.Enumeration findByShopperIdState(java.lang.Long userId,
                                                  java.lang.String couponState)
                                           throws java.rmi.RemoteException,
                                                  javax.ejb.FinderException,
                                                  javax.naming.NamingException

This method executes the following SQL script: SELECT T1.TIMEACCEPT, T1.USERS_ID, T1.STATE, T1.CPPMN_ID, T1.NUMUSE, T1.ACCEPTFROMTYPE, T1.CPWALLET_ID, T1.FIELD1 FROM CPWALLET T1 WHERE (T1.USERS_ID = ?) AND (T1.STATE = ?)

Parameters:
userId - The user Id.
couponState - The state of the coupon.
Returns:
The rows from CPWALLET table.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

fulfills

public boolean fulfills(java.lang.Long userId,
                        java.lang.String relation)
                 throws java.rmi.RemoteException,
                        java.lang.Exception,
                        javax.ejb.FinderException,
                        javax.naming.NamingException

This method is used for access control.

Parameters:
userId - The user Id.
relation - The relation.
Returns:
The method returns true if the user has the authentication to access the coupon.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
java.lang.Exception - The java.lang.Exception exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getAcceptFromType

public java.lang.String getAcceptFromType()
                                   throws java.rmi.RemoteException,
                                          javax.ejb.CreateException,
                                          javax.ejb.FinderException,
                                          javax.naming.NamingException

This method provides access to the CPWALLET.ACCEPTFROMTYPE column of DB2 type CHAR(4) NOT NULL.

The following is a description of this column:

Indicates from where the coupon was accepted:
B = banner advertisement.
E = e-mail.
O = offerlist.

Specified by:
getAcceptFromType in interface CouponWalletAccessBeanData
Returns:
The acceptance method(banner ad, e-mail or offerlist).
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getBcId

public java.lang.Long getBcId()
                       throws java.rmi.RemoteException,
                              javax.ejb.CreateException,
                              javax.ejb.FinderException,
                              javax.naming.NamingException

This method provides access to the CPWALLET.CPWALLET_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary Key.

Specified by:
getBcId in interface CouponWalletAccessBeanData
Returns:
The coupon Id.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getField1

public java.lang.String getField1()
                           throws java.rmi.RemoteException,
                                  javax.ejb.CreateException,
                                  javax.ejb.FinderException,
                                  javax.naming.NamingException

This method provides access to the CPWALLET.FIELD1 column of DB2 type VARCHAR(64) NULL.

The following is a description of this column:

Customizable.

Specified by:
getField1 in interface CouponWalletAccessBeanData
Returns:
The customizable field.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getNumUse

public java.lang.Integer getNumUse()
                            throws java.rmi.RemoteException,
                                   javax.ejb.CreateException,
                                   javax.ejb.FinderException,
                                   javax.naming.NamingException

This method provides access to the CPWALLET.NUMUSE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Number of times this coupon has been used.

Specified by:
getNumUse in interface CouponWalletAccessBeanData
Returns:
The number of times coupon has been used.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getOwner

public java.lang.Long getOwner()
                        throws java.lang.Exception,
                               java.rmi.RemoteException,
                               javax.ejb.FinderException,
                               javax.naming.NamingException

thsi method is used for access control.

Returns:
The user Id.
Throws:
java.lang.Exception - The java.lang.Exception exception
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getPromoId

public java.lang.Integer getPromoId()
                             throws java.rmi.RemoteException,
                                    javax.ejb.CreateException,
                                    javax.ejb.FinderException,
                                    javax.naming.NamingException

This method provides access to the CPWALLET.CPPMN_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Promotion ID. Foreign key to CPPMN table.

Specified by:
getPromoId in interface CouponWalletAccessBeanData
Returns:
The coupon promotion id.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getShopperId

public java.lang.Long getShopperId()
                            throws java.rmi.RemoteException,
                                   javax.ejb.CreateException,
                                   javax.ejb.FinderException,
                                   javax.naming.NamingException

This method provides access to the CPWALLET.USERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Customer ID. Foreign key to USERS table.

Specified by:
getShopperId in interface CouponWalletAccessBeanData
Returns:
The user Id.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getState

public java.lang.String getState()
                          throws java.rmi.RemoteException,
                                 javax.ejb.CreateException,
                                 javax.ejb.FinderException,
                                 javax.naming.NamingException

This method provides access to the CPWALLET.STATE column of DB2 type CHAR(4) NOT NULL.

The following is a description of this column:

State of the coupon, where U=Usable, D=Deleted, N=Not Usable, and E=Expired.

Specified by:
getState in interface CouponWalletAccessBeanData
Returns:
The state of the coupon in the wallet.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getTimeAccept

public java.sql.Timestamp getTimeAccept()
                                 throws java.rmi.RemoteException,
                                        javax.ejb.CreateException,
                                        javax.ejb.FinderException,
                                        javax.naming.NamingException

This method provides access to the CPWALLET.TIMEACCEPT column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

Time when the table entry was made.

Specified by:
getTimeAccept in interface CouponWalletAccessBeanData
Returns:
The time at which coupon was accepted.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

refreshCopyHelper

public void refreshCopyHelper()
                       throws java.rmi.RemoteException,
                              javax.ejb.CreateException,
                              javax.ejb.FinderException,
                              javax.naming.NamingException

Load data from the EJBObject.

Overrides:
refreshCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

setAcceptFromType

public void setAcceptFromType(java.lang.String acceptanceMethod)

This method provides access to the CPWALLET.ACCEPTFROMTYPE column of DB2 type CHAR(4) NOT NULL.

The following is a description of this column:

Indicates from where the coupon was accepted:
B = banner advertisement.
E = e-mail.
O = offerlist.

Specified by:
setAcceptFromType in interface CouponWalletAccessBeanData
Parameters:
acceptanceMethod - The acceptance method(banner ad, e-mail or offerlist).

setBcId

public void setBcId(java.lang.Long couponId)

This method provides access to the CPWALLET.CPWALLET_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary Key.

Specified by:
setBcId in interface CouponWalletAccessBeanData
Parameters:
couponId - The coupon id.

setField1

public void setField1(java.lang.String field1)

This method provides access to the CPWALLET.FIELD1 column of DB2 type VARCHAR(64) NULL.

The following is a description of this column:

Customizable.

Specified by:
setField1 in interface CouponWalletAccessBeanData
Parameters:
field1 - The customizable field.

setInitKey_bcId

public void setInitKey_bcId(java.lang.Long couponId)

Set the primary key for this object

Parameters:
couponId - The coupon Id.

setNumUse

public void setNumUse(java.lang.Integer numTimesCouponUsed)

This method provides access to the CPWALLET.NUMUSE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Number of times this coupon has been used.

Specified by:
setNumUse in interface CouponWalletAccessBeanData
Parameters:
numTimesCouponUsed - The number of times a coupon has been used.

setPromoId

public void setPromoId(java.lang.Integer couponPromotionId)

This method provides access to the CPWALLET.CPPMN_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Promotion ID. Foreign key to CPPMN table.

Specified by:
setPromoId in interface CouponWalletAccessBeanData
Parameters:
couponPromotionId - The coupon promotion Id.

setShopperId

public void setShopperId(java.lang.Long shopperId)

This method provides access to the CPWALLET.USERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Customer ID. Foreign key to USERS table.

Specified by:
setShopperId in interface CouponWalletAccessBeanData
Parameters:
shopperId - The shopper Id.

setState

public void setState(java.lang.String couponState)

This method provides access to the CPWALLET.STATE column of DB2 type CHAR(4) NOT NULL.

The following is a description of this column:

State of the coupon, where U=Usable, D=Deleted, N=Not Usable, and E=Expired.

Specified by:
setState in interface CouponWalletAccessBeanData
Parameters:
couponState - The state of the coupon in the wallet.

setTimeAccept

public void setTimeAccept(java.sql.Timestamp timeOfAdditionToWallet)

This method provides access to the CPWALLET.TIMEACCEPT column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

Time when the table entry was made.

Specified by:
setTimeAccept in interface CouponWalletAccessBeanData
Parameters:
timeOfAdditionToWallet - The time at which coupon was added to coupon wallet.