com.ibm.commerce.couponpromotion.objects
Class PromoDiscAccessBean

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

public class PromoDiscAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements PromoDiscAccessBeanData

This bean provides access to the CPPMNDISC table.

The following is a description of this table:

This table contains the discount conditions for a promotion. Every coupon has exactly one calculation code.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
PromoDiscAccessBean()
          Default constructor.
PromoDiscAccessBean(javax.ejb.EJBObject newPromoDiscEJB)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNDISC table.
PromoDiscAccessBean(java.lang.Integer newPromoId, java.lang.Integer newCalcCodeId)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNDISC table.
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 PromoDiscAccessBean findByPromoDiscId(java.lang.Integer promotionDiscountId)
          This method executes the following SQL script: SELECT T1.CPPMNDISC_ID, T1.CPPMN_ID, T1.CALCODE_ID FROM CPPMNDISC T1 WHERE T1.CPPMNDISC_ID = ?
 java.util.Enumeration findByPromoId(java.lang.Integer promotionId)
          This method executes the following SQL Script: SELECT T1.CPPMNDISC_ID, T1.CPPMN_ID, T1.CALCODE_ID FROM CPPMNDISC T1 WHERE T1.CPPMN_ID = ?
 java.lang.Integer getCalcCodeId()
          This method provides access to the CPPMNDISC.CALCODE_ID column of DB2 type INTEGER NOT NULL.
 java.lang.Integer getPromoDiscId()
          This method provides access to the CPPMNDISC.CPPMNDISC_ID column of DB2 type INTEGER NOT NULL.
 java.lang.Integer getPromoId()
          This method provides access to the CPPMNDISC.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setCalcCodeId(java.lang.Integer calcCodeId)
          This method provides access to the CPPMNDISC.CALCODE_ID column of DB2 type INTEGER NOT NULL.
 void setInitKey_promoDiscId(java.lang.Integer promotionDiscountId)
          Set the primary key for this object
 void setPromoDiscId(java.lang.Integer promotionDiscountId)
          This method provides access to the CPPMNDISC.CPPMNDISC_ID column of DB2 type INTEGER NOT NULL.
 void setPromoId(java.lang.Integer promotionId)
          This method provides access to the CPPMNDISC.CPPMN_ID column of DB2 type INTEGER 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

PromoDiscAccessBean

public PromoDiscAccessBean()

Default constructor. Maps to findByPrimaryKey.


PromoDiscAccessBean

public PromoDiscAccessBean(javax.ejb.EJBObject newPromoDiscEJB)
                    throws java.rmi.RemoteException

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

Parameters:
newPromoDiscEJB - The coupon promotion discount EJB.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

PromoDiscAccessBean

public PromoDiscAccessBean(java.lang.Integer newPromoId,
                           java.lang.Integer newCalcCodeId)
                    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 CPPMNDISC table.

Parameters:
newPromoId - The coupon promotion Id.
newCalcCodeId - The calculation code Id.
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

findByPromoDiscId

public PromoDiscAccessBean findByPromoDiscId(java.lang.Integer promotionDiscountId)
                                      throws java.rmi.RemoteException,
                                             javax.ejb.FinderException,
                                             javax.naming.NamingException

This method executes the following SQL script: SELECT T1.CPPMNDISC_ID, T1.CPPMN_ID, T1.CALCODE_ID FROM CPPMNDISC T1 WHERE T1.CPPMNDISC_ID = ?

Parameters:
promotionDiscountId - The coupon promotion discount Id.
Returns:
CPPMNDISC 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

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.CPPMNDISC_ID, T1.CPPMN_ID, T1.CALCODE_ID FROM CPPMNDISC T1 WHERE T1.CPPMN_ID = ?

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

getCalcCodeId

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

This method provides access to the CPPMNDISC.CALCODE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Foreign key to the CALCCODE table to represent discount condition for the promotion.

Specified by:
getCalcCodeId in interface PromoDiscAccessBeanData
Returns:
The calcode 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

getPromoDiscId

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

This method provides access to the CPPMNDISC.CPPMNDISC_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Coupon Discount ID, primary key.

Specified by:
getPromoDiscId in interface PromoDiscAccessBeanData
Returns:
The coupon promotion discount 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

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

The following is a description of this column:

Foreign key to the CPPMN table.

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

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

setCalcCodeId

public void setCalcCodeId(java.lang.Integer calcCodeId)

This method provides access to the CPPMNDISC.CALCODE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Foreign key to the CALCCODE table to represent discount condition for the promotion.

Specified by:
setCalcCodeId in interface PromoDiscAccessBeanData
Parameters:
calcCodeId - The calcode Id.

setInitKey_promoDiscId

public void setInitKey_promoDiscId(java.lang.Integer promotionDiscountId)

Set the primary key for this object

Parameters:
promotionDiscountId - The coupon promotion discount Id.

setPromoDiscId

public void setPromoDiscId(java.lang.Integer promotionDiscountId)

This method provides access to the CPPMNDISC.CPPMNDISC_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Coupon Discount ID, primary key.

Specified by:
setPromoDiscId in interface PromoDiscAccessBeanData
Parameters:
promotionDiscountId - The coupon promotion discount Id.

setPromoId

public void setPromoId(java.lang.Integer promotionId)

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

The following is a description of this column:

Foreign key to the CPPMN table.

Specified by:
setPromoId in interface PromoDiscAccessBeanData
Parameters:
promotionId - The coupon promotion Id.
Returns:
void