com.ibm.commerce.couponpromotion.objects
Class PromoProdAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.couponpromotion.objects.PromoProdAccessBean
All Implemented Interfaces:
PromoProdAccessBeanData, java.io.Serializable

public class PromoProdAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements PromoProdAccessBeanData

This bean provides access to the CPPMNPROD table.

The following is a description of this table:

This table contains the purchase conditions for a promotion. If the purchase condition type in CPPMN table was "P", then this table is used to find out all the items that are required for this Coupon to be redeemed.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
PromoProdAccessBean()
          Default constructor.
PromoProdAccessBean(javax.ejb.EJBObject newPromoProdEJB)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNPROD table.
PromoProdAccessBean(java.lang.Integer newPromoId, java.lang.Long newItemId, java.lang.Double newItemQty, java.lang.String newQtyMeasure)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNPROD table.
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 java.util.Enumeration findByPromoId(java.lang.Integer promotionId)
          This method executes the following SQL script: SELECT T1.CATENTRY_ID, T1.CPPMN_ID, T1.QTYMEASURE, T1.QUANTITY FROM CPPMNPROD T1 WHERE (T1.CPPMN_ID = ?)
 PromoProdAccessBean findByPromoIdProdId(java.lang.Integer promotionId, java.lang.Long catalogEntryId)
          This method executes the following SQl script: SELECT T1.CATENTRY_ID, T1.CPPMN_ID, T1.QTYMEASURE, T1.QUANTITY FROM CPPMNPROD T1 WHERE (T1.CPPMN_ID = ?) AND (T1.CATENTRY_ID = ?)
 java.lang.Long getItemId()
          This method provides access to the CPPMNPROD.CATENTRY_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Double getItemQty()
          This method provides access to the CPPMNPROD.QUANTITY column of DB2 type FLOAT NOT NULL.
 java.lang.Integer getPromoId()
          This method provides access to the CPPMNPROD.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 java.lang.String getQtyMeasure()
          This method provides access to the CPPMNPROD.QTYMEASURE column of DB2 type CHAR(16) NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setInitKey_itemId(java.lang.Long itemId)
          Set the primary key for this object
 void setInitKey_promoId(java.lang.Integer promotionId)
          Set the primary key for this object
 void setItemId(java.lang.Long itemId)
          This method provides access to the CPPMNPROD.CATENTRY_ID column of DB2 type BIGINT NOT NULL.
 void setItemQty(java.lang.Double itemQuantity)
          This method provides access to the CPPMNPROD.QUANTITY column of DB2 type FLOAT NOT NULL.
 void setPromoId(java.lang.Integer promotionId)
          This method provides access to the CPPMNPROD.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 void setQtyMeasure(java.lang.String quantityUnit)
          This method provides access to the CPPMNPROD.QTYMEASURE column of DB2 type CHAR(16) 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

PromoProdAccessBean

public PromoProdAccessBean()

Default constructor. Maps to findByPrimaryKey.


PromoProdAccessBean

public PromoProdAccessBean(javax.ejb.EJBObject newPromoProdEJB)
                    throws java.rmi.RemoteException

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

Parameters:
newPromoProdEJB - The coupon promotion product EJB.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

PromoProdAccessBean

public PromoProdAccessBean(java.lang.Integer newPromoId,
                           java.lang.Long newItemId,
                           java.lang.Double newItemQty,
                           java.lang.String newQtyMeasure)
                    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 CPPMNPROD table.

Parameters:
newPromoId - The coupon promotion Id.
newItemId - The product Id.
newItemQty - The minimum quantity required for the coupon to be applicable.
newQtyMeasure - The quantity measure.
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

findByPromoId

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

This method executes the following SQL script: SELECT T1.CATENTRY_ID, T1.CPPMN_ID, T1.QTYMEASURE, T1.QUANTITY FROM CPPMNPROD T1 WHERE (T1.CPPMN_ID = ?)

Parameters:
promotionId - The coupon promotion Id.
Returns:
The rows from CPPMNPROD 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

findByPromoIdProdId

public PromoProdAccessBean findByPromoIdProdId(java.lang.Integer promotionId,
                                               java.lang.Long catalogEntryId)
                                        throws java.rmi.RemoteException,
                                               javax.ejb.FinderException,
                                               javax.naming.NamingException

This method executes the following SQl script: SELECT T1.CATENTRY_ID, T1.CPPMN_ID, T1.QTYMEASURE, T1.QUANTITY FROM CPPMNPROD T1 WHERE (T1.CPPMN_ID = ?) AND (T1.CATENTRY_ID = ?)

Parameters:
promotionId - The coupon promotion Id.
catalogEntryId - The catalog entry Id for the product.
Returns:
The row from CPPMNPROD 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

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

The following is a description of this column:

Primary key. This is product ID - foreign key to CATENTRY table.

Specified by:
getItemId in interface PromoProdAccessBeanData
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

getItemQty

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

This method provides access to the CPPMNPROD.QUANTITY column of DB2 type FLOAT NOT NULL.

The following is a description of this column:

This is the quantity of the item to be bought to satisfy the condition.

Specified by:
getItemQty in interface PromoProdAccessBeanData
Returns:
The qualifying quantity required for the coupon to be applicable.
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

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 CPPMNPROD.CPPMN_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Primary key. Foreign key to the CPPMN table.

Specified by:
getPromoId in interface PromoProdAccessBeanData
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

getQtyMeasure

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

This method provides access to the CPPMNPROD.QTYMEASURE column of DB2 type CHAR(16) NOT NULL.

The following is a description of this column:

Specifies the quantity measure for the item.

Specified by:
getQtyMeasure in interface PromoProdAccessBeanData
Returns:
The unit the coupon promotion.
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

setInitKey_itemId

public void setInitKey_itemId(java.lang.Long itemId)

Set the primary key for this object

Parameters:
itemId - The product Id.

setInitKey_promoId

public void setInitKey_promoId(java.lang.Integer promotionId)

Set the primary key for this object

Parameters:
promotionId - The coupon promotion Id.

setItemId

public void setItemId(java.lang.Long itemId)

This method provides access to the CPPMNPROD.CATENTRY_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Primary key. This is product ID - foreign key to CATENTRY table.

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

setItemQty

public void setItemQty(java.lang.Double itemQuantity)

This method provides access to the CPPMNPROD.QUANTITY column of DB2 type FLOAT NOT NULL.

The following is a description of this column:

This is the quantity of the item to be bought to satisfy the condition.

Specified by:
setItemQty in interface PromoProdAccessBeanData
Parameters:
itemQuantity - The qualifying quantity for the product.

setPromoId

public void setPromoId(java.lang.Integer promotionId)

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

The following is a description of this column:

Primary key. Foreign key to the CPPMN table.

Specified by:
setPromoId in interface PromoProdAccessBeanData
Parameters:
promotionId - The coupon promotion Id.

setQtyMeasure

public void setQtyMeasure(java.lang.String quantityUnit)

This method provides access to the CPPMNPROD.QTYMEASURE column of DB2 type CHAR(16) NOT NULL.

The following is a description of this column:

Specifies the quantity measure for the item.

Specified by:
setQtyMeasure in interface PromoProdAccessBeanData
Parameters:
quantityUnit - The unit of the quantity.