com.ibm.commerce.couponredemption.objects
Class CouponItemMapAccessBean

java.lang.Object
  com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
      com.ibm.commerce.couponredemption.objects.CouponItemMapAccessBean
All Implemented Interfaces:
CouponItemMapAccessBeanData

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

This table stores all of the items from the given (completed) order that were applicable to the selected coupon set. This access bean corresponds to the database table 'CPITMAP'.

See Also:
Serialized Form

Constructor Summary
CouponItemMapAccessBean()
Zero argument constructor used to initialize the access bean.
CouponItemMapAccessBean(javax.ejb.EJBObject o)
constructor
CouponItemMapAccessBean(java.lang.Long newBcId, 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).
protected java.lang.String defaultJNDIName()
java.util.Enumeration findByBcId(java.lang.Long newBcId)
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.
protected void instantiateEJB()
protected boolean instantiateEJBByPrimaryKey()
void refreshCopyHelper()
Load data from the EJBObject.
void setBcId(java.lang.Long newValue)
This method accesses a non-CMP field
void setDiscAmt(java.math.BigDecimal newValue)
This method accesses a non-CMP field
void setInitKey_bcId(java.lang.Long newValue)
Set the primary key for this object
void setInitKey_itemId(java.lang.Long newValue)
Set the primary key for this object
void setItemId(java.lang.Long newValue)
This method accesses a non-CMP field
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CouponItemMapAccessBean

public CouponItemMapAccessBean()
Zero argument constructor used to initialize the access bean. This constructor corresponds to the following home interface method: public abstract com.ibm.commerce.couponredemption.objects.CouponItemMap com.ibm.commerce.couponredemption.objimpl.CouponItemMapHomeBase.findByPrimaryKey(com.ibm.commerce.couponredemption.objects.CouponItemMapKey) throws java.rmi.RemoteException,javax.ejb.FinderException The home interface method properties need to be set by calling the following setter methods before calling any business methods: setInitKey_bcId( java.lang.Long ) setInitKey_itemId( java.lang.Long )

CouponItemMapAccessBean

public CouponItemMapAccessBean(javax.ejb.EJBObject o)
                        throws java.rmi.RemoteException
constructor
Parameters:
o - javax.ejb.EJBObject
Throws:
java.rmi.RemoteException

CouponItemMapAccessBean

public CouponItemMapAccessBean(java.lang.Long newBcId,
                               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:
newBcId - 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

findByBcId

public java.util.Enumeration findByBcId(java.lang.Long newBcId)
                                 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:
newBcId - 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

setInitKey_bcId

public void setInitKey_bcId(java.lang.Long newValue)

Set the primary key for this object

Parameters:
newValue - java.lang.Long
Returns:
void

setInitKey_itemId

public void setInitKey_itemId(java.lang.Long newValue)

Set the primary key for this object

Parameters:
newValue - java.lang.Long
Returns:
void

defaultJNDIName

protected java.lang.String defaultJNDIName()
Returns:
String

instantiateEJB

protected void instantiateEJB()
                       throws java.rmi.RemoteException,
                              javax.ejb.FinderException,
                              javax.naming.NamingException
Returns:
void
Throws:
java.rmi.RemoteException
javax.ejb.FinderException
javax.naming.NamingException

instantiateEJBByPrimaryKey

protected boolean instantiateEJBByPrimaryKey()
                                      throws java.rmi.RemoteException,
                                             javax.ejb.CreateException,
                                             javax.naming.NamingException
Returns:
boolean
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.naming.NamingException

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).

Returns:
void
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

refreshCopyHelper

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

Load data from the EJBObject.

Returns:
void
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

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:

Foreign key to the ORDERITEMS table. This is a primary key.

Specified by:
getItemId in interface CouponItemMapAccessBeanData
Returns:
java.lang.Long
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setItemId

public void setItemId(java.lang.Long newValue)
This method accesses a non-CMP field
Specified by:
setItemId in interface CouponItemMapAccessBeanData

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:

Foreign key to the CPWALLET table. This is a primary key.

Specified by:
getBcId in interface CouponItemMapAccessBeanData
Returns:
java.lang.Long
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setBcId

public void setBcId(java.lang.Long newValue)
This method accesses a non-CMP field
Specified by:
setBcId in interface CouponItemMapAccessBeanData

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 applied to this item when this coupon is used.

Specified by:
getDiscAmt in interface CouponItemMapAccessBeanData
Returns:
java.math.BigDecimal
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setDiscAmt

public void setDiscAmt(java.math.BigDecimal newValue)
This method accesses a non-CMP field
Specified by:
setDiscAmt in interface CouponItemMapAccessBeanData

Feedback