com.ibm.commerce.couponpromotion.objects
Class PromoDiscAccessBean

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

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

This table contains the discount conditions for a promotion. Every coupon has exactly one calculation code. This access bean corresponds to the database table 'CPPMNDISC'.

See Also:
Serialized Form

Constructor Summary
PromoDiscAccessBean()
Zero argument constructor used to initialize the access bean.
PromoDiscAccessBean(java.lang.Integer paramPromoId, java.lang.Integer paramCalcCodeId)
Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNDISC table.
PromoDiscAccessBean(javax.ejb.EJBObject o)
constructor
Method Summary
void commitCopyHelper()
Update(flush) data to the EJBObject (persistent storage).
protected java.lang.String defaultJNDIName()
PromoDiscAccessBean findByPromoDiscId(java.lang.Integer paramPromoDiscid)
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 paramPromoId)
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.
protected void instantiateEJB()
protected boolean instantiateEJBByPrimaryKey()
void refreshCopyHelper()
Load data from the EJBObject.
void setCalcCodeId(java.lang.Integer newValue)
This method accesses a non-CMP field
void setInitKey_promoDiscId(java.lang.Integer newValue)
Set the primary key for this object
void setPromoDiscId(java.lang.Integer newValue)
This method accesses a non-CMP field
void setPromoId(java.lang.Integer 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

PromoDiscAccessBean

public PromoDiscAccessBean()
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.PromoDisc com.ibm.commerce.couponpromotion.objimpl.PromoDiscHomeBase.findByPrimaryKey(com.ibm.commerce.couponpromotion.objects.PromoDiscKey) 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_promoDiscId( java.lang.Integer )

PromoDiscAccessBean

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

PromoDiscAccessBean

public PromoDiscAccessBean(java.lang.Integer paramPromoId,
                           java.lang.Integer paramCalcCodeId)
                    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:
paramPromoId - The coupon promotion Id.
paramCalcCodeId - 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

findByPromoDiscId

public PromoDiscAccessBean findByPromoDiscId(java.lang.Integer paramPromoDiscid)
                                      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:
paramPromoDiscid - 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

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

Parameters:
paramPromoId - 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

setInitKey_promoDiscId

public void setInitKey_promoDiscId(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

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. The primary key.

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

setPromoDiscId

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

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

setCalcCodeId

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

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:
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 PromoDiscAccessBeanData

Feedback