com.ibm.commerce.couponredemption.objects
Class CouponItemMapAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.couponredemption.objects.CouponItemMapAccessBean
All Implemented Interfaces:
CouponItemMapAccessBeanData, java.io.Serializable

public class CouponItemMapAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements CouponItemMapAccessBeanData

This bean provides access to the CPITMAP table.

The following is a description of this table:

This table stores all the items from the given (completed) order that were applicable to the selected coupon set.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
CouponItemMapAccessBean()
          Default constructor.
CouponItemMapAccessBean(javax.ejb.EJBObject newCouponItemMapEJB)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPITMAP table.
CouponItemMapAccessBean(java.lang.Long newCPWalletId, java.lang.Long newItemId, java.math.BigDecimal newDiscAmt)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPITMAP table.
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 java.util.Enumeration findByBcId(java.lang.Long couponId)
          This method executes the following SQL script: SELECT T1.ORDERITEMS_ID, T1.CPWALLET_ID, T1.DISCAMT FROM CPITMAP T1 WHERE (T1.CPWALLET_ID = ?)
 java.lang.Long getBcId()
          This method provides access to the CPITMAP.CPWALLET_ID column of DB2 type BIGINT NOT NULL.
 java.math.BigDecimal getDiscAmt()
          This method provides access to the CPITMAP.DISCAMT column of DB2 type DECIMAL(20,5) NOT NULL.
 java.lang.Long getItemId()
          This method provides access to the CPITMAP.ORDERITEMS_ID column of DB2 type BIGINT NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setBcId(java.lang.Long couponId)
          This method provides access to the CPITMAP.CPWALLET_ID column of DB2 type BIGINT NOT NULL.
 void setDiscAmt(java.math.BigDecimal discountAmount)
          This method provides access to the CPITMAP.DISCAMT column of DB2 type DECIMAL(20,5) NOT NULL.
 void setInitKey_bcId(java.lang.Long couponId)
          Set the primary key for this object
 void setInitKey_itemId(java.lang.Long itemId)
          Set the primary key for this object
 void setItemId(java.lang.Long itemId)
          This method provides access to the CPITMAP.ORDERITEMS_ID column of DB2 type BIGINT NOT 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

CouponItemMapAccessBean

public CouponItemMapAccessBean()

Default constructor. Maps to findByPrimaryKey.


CouponItemMapAccessBean

public CouponItemMapAccessBean(javax.ejb.EJBObject newCouponItemMapEJB)
                        throws java.rmi.RemoteException

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

Parameters:
newCouponItemMapEJB - The Coupon Item Map EJB.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

CouponItemMapAccessBean

public CouponItemMapAccessBean(java.lang.Long newCPWalletId,
                               java.lang.Long newItemId,
                               java.math.BigDecimal newDiscAmt)
                        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 CPITMAP table.

Parameters:
newCPWalletId - The coupon Id.
newItemId - The product Id.
newDiscAmt - The discount amount.
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 java.util.Enumeration findByBcId(java.lang.Long couponId)
                                 throws java.rmi.RemoteException,
                                        javax.ejb.FinderException,
                                        javax.naming.NamingException

This method executes the following SQL script: SELECT T1.ORDERITEMS_ID, T1.CPWALLET_ID, T1.DISCAMT FROM CPITMAP T1 WHERE (T1.CPWALLET_ID = ?)

Parameters:
couponId - The coupon Id.
Returns:
The row from CPITMAP 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

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 CPITMAP.CPWALLET_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary key. Foreign key to the CPWALLET table.

Specified by:
getBcId in interface CouponItemMapAccessBeanData
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

getDiscAmt

public java.math.BigDecimal getDiscAmt()
                                throws java.rmi.RemoteException,
                                       javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException

This method provides access to the CPITMAP.DISCAMT column of DB2 type DECIMAL(20,5) NOT NULL.

The following is a description of this column:

The discount amount for this item when this coupon is used.

Specified by:
getDiscAmt in interface CouponItemMapAccessBeanData
Returns:
The discount amount.
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

getItemId

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

This method provides access to the CPITMAP.ORDERITEMS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary key. Foreign key to the ORDERITEMS table.

Specified by:
getItemId in interface CouponItemMapAccessBeanData
Returns:
The product 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

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

setBcId

public void setBcId(java.lang.Long couponId)

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

The following is a description of this column:

Primary key. Foreign key to the CPWALLET table.

Specified by:
setBcId in interface CouponItemMapAccessBeanData
Parameters:
couponId - The coupon Id.

setDiscAmt

public void setDiscAmt(java.math.BigDecimal discountAmount)

This method provides access to the CPITMAP.DISCAMT column of DB2 type DECIMAL(20,5) NOT NULL.

The following is a description of this column:

The discount amount for this item when this coupon is used.

Specified by:
setDiscAmt in interface CouponItemMapAccessBeanData
Parameters:
discountAmount - The discount amount.

setInitKey_bcId

public void setInitKey_bcId(java.lang.Long couponId)

Set the primary key for this object

Parameters:
couponId - The coupon Id.

setInitKey_itemId

public void setInitKey_itemId(java.lang.Long itemId)

Set the primary key for this object

Parameters:
itemId - The product Id.

setItemId

public void setItemId(java.lang.Long itemId)

This method provides access to the CPITMAP.ORDERITEMS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary key. Foreign key to the ORDERITEMS table.

Specified by:
setItemId in interface CouponItemMapAccessBeanData
Parameters:
itemId - The product Id.