com.ibm.commerce.couponpromotion.objects
Class PromoOrderAccessBean

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

public class PromoOrderAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements PromoOrderAccessBeanData

This bean provides access to the CPPMNORD table.

The following is a description of this table:

This table contains the minimum purchase amount in the shopping cart for this coupon to be applicable to.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
PromoOrderAccessBean()
          Default constructor.
PromoOrderAccessBean(javax.ejb.EJBObject newPromoOrderEJB)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNORD table.
PromoOrderAccessBean(java.lang.Integer newPromoId, java.math.BigDecimal newOrderMin)
          Maps to a corresponding ejbCreate method in the home interface of the EJB to create an entry in CPPMNORD table.
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 PromoOrderAccessBean findByPromoId(java.lang.Integer promotionId)
          This method executes the following SQL script: SELECT T1.ORDERMAX, T1.ORDERMIN, T1.CPPMN_ID FROM CPPMNORD T1 WHERE T1.CPPMN_ID = ?
 java.math.BigDecimal getOrderMax()
          This method provides access to the CPPMNORD.ORDERMAX column of DB2 type DECIMAL(20,5) NULL.
 java.math.BigDecimal getOrderMin()
          This method provides access to the CPPMNORD.ORDERMIN column of DB2 type DECIMAL(20,5) NOT NULL.
 java.lang.Integer getPromoId()
          This method provides access to the CPPMNORD.CPPMN_ID column of DB2 type INTEGER NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setInitKey_promoId(java.lang.Integer promotionId)
          Set the primary key for this object
 void setOrderMax(java.math.BigDecimal maxOrderAmount)
          This method provides access to the CPPMNORD.ORDERMAX column of DB2 type DECIMAL(20,5) NULL.
 void setOrderMin(java.math.BigDecimal minOrderAmount)
          This method provides access to the CPPMNORD.ORDERMIN column of DB2 type DECIMAL(20,5) NOT NULL.
 void setPromoId(java.lang.Integer promotionId)
          This method provides access to the CPPMNORD.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

PromoOrderAccessBean

public PromoOrderAccessBean()

Default constructor. Maps to findByPrimaryKey.


PromoOrderAccessBean

public PromoOrderAccessBean(javax.ejb.EJBObject newPromoOrderEJB)
                     throws java.rmi.RemoteException

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

Parameters:
newPromoOrderEJB - The coupon promotion order EJB.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

PromoOrderAccessBean

public PromoOrderAccessBean(java.lang.Integer newPromoId,
                            java.math.BigDecimal newOrderMin)
                     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 CPPMNORD table.

Parameters:
newPromoId - The coupon promotion Id.
newOrderMin - The minimum order amount required to redeem the coupon.
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 PromoOrderAccessBean findByPromoId(java.lang.Integer promotionId)
                                   throws java.rmi.RemoteException,
                                          javax.ejb.FinderException,
                                          javax.naming.NamingException

This method executes the following SQL script: SELECT T1.ORDERMAX, T1.ORDERMIN, T1.CPPMN_ID FROM CPPMNORD T1 WHERE T1.CPPMN_ID = ?

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

getOrderMax

public java.math.BigDecimal getOrderMax()
                                 throws java.rmi.RemoteException,
                                        javax.ejb.CreateException,
                                        javax.ejb.FinderException,
                                        javax.naming.NamingException

This method provides access to the CPPMNORD.ORDERMAX column of DB2 type DECIMAL(20,5) NULL.

The following is a description of this column:

Maximum purchase amount in the shopping cart.

Specified by:
getOrderMax in interface PromoOrderAccessBeanData
Returns:
the maximum order amount beyond which coupon is not 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

getOrderMin

public java.math.BigDecimal getOrderMin()
                                 throws java.rmi.RemoteException,
                                        javax.ejb.CreateException,
                                        javax.ejb.FinderException,
                                        javax.naming.NamingException

This method provides access to the CPPMNORD.ORDERMIN column of DB2 type DECIMAL(20,5) NOT NULL.

The following is a description of this column:

Minimum purchase amount in the shopping cart.

Specified by:
getOrderMin in interface PromoOrderAccessBeanData
Returns:
The minimum order amount below which coupon is not 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 CPPMNORD.CPPMN_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Foreign key to CPPMN table.

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

setInitKey_promoId

public void setInitKey_promoId(java.lang.Integer promotionId)

Set the primary key for this object

Parameters:
promotionId - The coupon promotion Id.

setOrderMax

public void setOrderMax(java.math.BigDecimal maxOrderAmount)

This method provides access to the CPPMNORD.ORDERMAX column of DB2 type DECIMAL(20,5) NULL.

The following is a description of this column:

Maximum purchase amount in the shopping cart.

Specified by:
setOrderMax in interface PromoOrderAccessBeanData
Parameters:
maxOrderAmount - The maximum order amount beyind which coupon is not applicable.

setOrderMin

public void setOrderMin(java.math.BigDecimal minOrderAmount)

This method provides access to the CPPMNORD.ORDERMIN column of DB2 type DECIMAL(20,5) NOT NULL.

The following is a description of this column:

Minimum purchase amount in the shopping cart.

Specified by:
setOrderMin in interface PromoOrderAccessBeanData
Parameters:
minOrderAmount - The minimum order amount below which the coupon is not applicable.

setPromoId

public void setPromoId(java.lang.Integer promotionId)

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

The following is a description of this column:

Foreign key to CPPMN table.

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