com.ibm.commerce.couponpromotion.objects
Class PromoProdAccessBean

java.lang.Object
  com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
      com.ibm.commerce.couponpromotion.objects.PromoProdAccessBean
All Implemented Interfaces:
PromoProdAccessBeanData

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

This table contains the purchase conditions for a promotion. If the purchase condition type in CPPMN table was &quo This access bean corresponds to the database table 'CPPMNPROD'.

See Also:
Serialized Form

Constructor Summary
PromoProdAccessBean()
Zero argument constructor used to initialize the access bean.
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.
PromoProdAccessBean(javax.ejb.EJBObject o)
constructor
Method Summary
void commitCopyHelper()
Update(flush) data to the EJBObject (persistent storage).
protected java.lang.String defaultJNDIName()
java.util.Enumeration findByPromoId(java.lang.Integer paramPromoId)
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 paramPromoId, java.lang.Long paramProdId)
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.
protected void instantiateEJB()
protected boolean instantiateEJBByPrimaryKey()
void refreshCopyHelper()
Load data from the EJBObject.
void setInitKey_itemId(java.lang.Long newValue)
Set the primary key for this object
void setInitKey_promoId(java.lang.Integer newValue)
Set the primary key for this object
void setItemId(java.lang.Long newValue)
This method accesses a non-CMP field
void setItemQty(java.lang.Double newValue)
This method accesses a non-CMP field
void setPromoId(java.lang.Integer newValue)
This method accesses a non-CMP field
void setQtyMeasure(java.lang.String 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

PromoProdAccessBean

public PromoProdAccessBean()
Zero argument constructor used to initialize the access bean. This constructor corresponds to the following home interface method: public abstract com.ibm.commerce.couponpromotion.objects.PromoProd com.ibm.commerce.couponpromotion.objimpl.PromoProdHomeBase.findByPrimaryKey(com.ibm.commerce.couponpromotion.objects.PromoProdKey) 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_itemId( java.lang.Long ) setInitKey_promoId( java.lang.Integer )

PromoProdAccessBean

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

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

findByPromoIdProdId

public PromoProdAccessBean findByPromoIdProdId(java.lang.Integer paramPromoId,
                                               java.lang.Long paramProdId)
                                        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:
paramPromoId - The coupon promotion Id.
paramProdId - 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

findByPromoId

public java.util.Enumeration findByPromoId(java.lang.Integer paramPromoId)
                                    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:
paramPromoId - 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

setInitKey_itemId

public void setInitKey_itemId(java.lang.Long newValue)

Set the primary key for this object

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

setInitKey_promoId

public void setInitKey_promoId(java.lang.Integer newValue)

Set the primary key for this object

Parameters:
newValue - java.lang.Integer
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 CPPMNPROD.CATENTRY_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Foreign key to the CATENTRY table. This is the product ID. This is a primary key.

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

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:
java.lang.String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setQtyMeasure

public void setQtyMeasure(java.lang.String newValue)
This method accesses a non-CMP field
Specified by:
setQtyMeasure in interface PromoProdAccessBeanData

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 that must be bought to satisfy the condition.

Specified by:
getItemQty in interface PromoProdAccessBeanData
Returns:
java.lang.Double
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setItemQty

public void setItemQty(java.lang.Double newValue)
This method accesses a non-CMP field
Specified by:
setItemQty in interface PromoProdAccessBeanData

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:

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

Specified by:
getPromoId in interface PromoProdAccessBeanData
Returns:
java.lang.Integer
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

setPromoId

public void setPromoId(java.lang.Integer newValue)
This method accesses a non-CMP field
Specified by:
setPromoId in interface PromoProdAccessBeanData

Feedback