com.ibm.commerce.payment.objects
Class TradingPurchaseAmountAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.payment.objects.TradingPurchaseAmountAccessBean
All Implemented Interfaces:
java.io.Serializable, TradingPurchaseAmountAccessBeanData

public class TradingPurchaseAmountAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements TradingPurchaseAmountAccessBeanData

This bean provides access to the TRDPURAMT table.

The following is a description of this table:

This table is used to keep track of Purchase Amounts by Trading Agreements, by Orders or OrderItems. Entries are created only for Trading Agreement with Right-to-Buy by Amount or Obligation-to-Buy by Amount Terms and Conditions.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
TradingPurchaseAmountAccessBean()
          Default constructor.
TradingPurchaseAmountAccessBean(javax.ejb.EJBObject object)
          Creates an access bean for the specified EJB
TradingPurchaseAmountAccessBean(java.lang.Long tradingId, java.lang.Long orderId, java.math.BigDecimal purchaseAmount)
          Maps to a corresponding ejbCreate method in the home interface of the EJB
TradingPurchaseAmountAccessBean(java.lang.Long tradingId, java.lang.Long orderId, java.lang.Long orderItemsId, java.math.BigDecimal purchaseAmount, java.lang.String currency)
          Maps to a corresponding ejbCreate method in the home interface of the EJB
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 java.util.Enumeration findByOrderId(java.lang.Long aDByOrderId)
          Retrieves the TradingPurchaseAmountAccessBeans for the specified Order.
 java.lang.String getAmount()
          This method provides access to the TRDPURAMT.AMOUNT column of DB2 type DECIMAL(20,5) NOT NULL.
 java.math.BigDecimal getAmountInEJBType()
          This method provides access to the TRDPURAMT.AMOUNT column of DB2 type DECIMAL(20,5) NOT NULL.
 java.lang.String getCurrency()
          This method provides access to the TRDPURAMT.SETCCURR column of DB2 type CHAR(3) NULL.
 java.lang.String getOrderId()
          This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getOrderIdInEJBType()
          This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.
 java.lang.String getOrderItemId()
          This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.
 java.lang.Long getOrderItemIdInEJBType()
          This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.
 java.lang.String getTradingId()
          This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getTradingIdInEJBType()
          This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.
 java.lang.String getTradingPurchaseAmountId()
          This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getTradingPurchaseAmountIdInEJBType()
          This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setAmount(java.math.BigDecimal aAmount)
          This method provides access to the TRDPURAMT.AMOUNT column of DB2 type DECIMAL(20,5) NOT NULL.
 void setAmount(java.lang.String aAmount)
          This method provides access to the TRDPURAMT.AMOUNT column of DB2 type DECIMAL(20,5) NOT NULL.
 void setCurrency(java.lang.String aCurrency)
          This method provides access to the TRDPURAMT.SETCCURR column of DB2 type CHAR(3) NULL.
 void setInitKey_tradingPurchaseAmountId(java.lang.String aInitKey_tradingPurchaseAmountId)
          Set the primary key for this object
 void setOrderId(java.lang.Long aOrderId)
          This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.
 void setOrderId(java.lang.String aOrderId)
          This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.
 void setOrderItemId(java.lang.Long aOrderItemId)
          This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.
 void setOrderItemId(java.lang.String aOrderItemId)
          This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.
 void setTradingId(java.lang.Long aTradingId)
          This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.
 void setTradingId(java.lang.String aTradingId)
          This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.
 void setTradingPurchaseAmountId(java.lang.Long aTradingPurchaseAmountId)
          This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.
 void setTradingPurchaseAmountId(java.lang.String aTradingPurchaseAmountId)
          This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT 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

TradingPurchaseAmountAccessBean

public TradingPurchaseAmountAccessBean()

Default constructor. Maps to findByPrimaryKey.


TradingPurchaseAmountAccessBean

public TradingPurchaseAmountAccessBean(javax.ejb.EJBObject object)
                                throws java.rmi.RemoteException

Creates an access bean for the specified EJB

Parameters:
object - The EJB Object used for the access bean construction.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception

TradingPurchaseAmountAccessBean

public TradingPurchaseAmountAccessBean(java.lang.Long tradingId,
                                       java.lang.Long orderId,
                                       java.math.BigDecimal purchaseAmount)
                                throws javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException,
                                       java.rmi.RemoteException

Maps to a corresponding ejbCreate method in the home interface of the EJB

Parameters:
tradingId - The internal ID of the Trading Agreement.
orderId - The ID of the order.
purchaseAmount - The purchase amount.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception
java.rmi.RemoteException - The java.rmi.RemoteException exception

TradingPurchaseAmountAccessBean

public TradingPurchaseAmountAccessBean(java.lang.Long tradingId,
                                       java.lang.Long orderId,
                                       java.lang.Long orderItemsId,
                                       java.math.BigDecimal purchaseAmount,
                                       java.lang.String currency)
                                throws javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException,
                                       java.rmi.RemoteException

Maps to a corresponding ejbCreate method in the home interface of the EJB

Parameters:
tradingId - The internal ID of the Trading Agreement.
orderId - The ID of the order.
orderItemsId - The ID of the orderItems within the order.
purchaseAmount - The purchase amount.
currency - The currency of the amount.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception
java.rmi.RemoteException - The java.rmi.RemoteException 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

findByOrderId

public java.util.Enumeration findByOrderId(java.lang.Long aDByOrderId)
                                    throws java.rmi.RemoteException,
                                           javax.ejb.FinderException,
                                           javax.naming.NamingException

Retrieves the TradingPurchaseAmountAccessBeans for the specified Order.

The SQL query used to fetch all the required rows from the TRDPURAMT table is:

SELECT * FROM TRDPURAMT T1 WHERE T1.ORDERS_ID=?

Parameters:
orderId - The ID of the order.
Returns:
An Enumeration of all the TradingPurchaseAccessBeans representing rows that match the search criteria.
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

getAmount

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

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

The following is a description of this column:

Expected purchase amounts for this Trading Agreement for this Order or OrderItem. The amount is in the same currency of the Right-to-Buy Amount and Obligation-to-Buy Amount.

Specified by:
getAmount in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getAmountInEJBType

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

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

The following is a description of this column:

Expected purchase amounts for this Trading Agreement for this Order or OrderItem. The amount is in the same currency of the Right-to-Buy Amount and Obligation-to-Buy Amount.

Returns:
java.math.BigDecimal
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

getCurrency

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

This method provides access to the TRDPURAMT.SETCCURR column of DB2 type CHAR(3) NULL.

The following is a description of this column:

Currency of the Amount field. This is a currency code as per ISO 4217 standards.

Specified by:
getCurrency in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getOrderId

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

This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Order ID. Foreign key to the ORDERS table.

Specified by:
getOrderId in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getOrderIdInEJBType

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

This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Order ID. Foreign key to the ORDERS table.

Returns:
java.lang.Long
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

getOrderItemId

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

This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

ID of the OrderItem. This is set to null if all the OrderItems of the Order specify the same Trading ID. Foreign key to the ORDERITEMS table.

Specified by:
getOrderItemId in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getOrderItemIdInEJBType

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

This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

ID of the OrderItem. This is set to null if all the OrderItems of the Order specify the same Trading ID. Foreign key to the ORDERITEMS table.

Returns:
java.lang.Long
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

getTradingId

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

This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

ID for the Trading Agreement. Foreign key to the TRADING table.

Specified by:
getTradingId in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getTradingIdInEJBType

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

This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

ID for the Trading Agreement. Foreign key to the TRADING table.

Returns:
java.lang.Long
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

getTradingPurchaseAmountId

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

This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Generated unique key for this row.

Specified by:
getTradingPurchaseAmountId in interface TradingPurchaseAmountAccessBeanData
Returns:
java.lang.String
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

getTradingPurchaseAmountIdInEJBType

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

This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Generated unique key for this row.

Returns:
java.lang.Long
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

setAmount

public void setAmount(java.math.BigDecimal aAmount)

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

The following is a description of this column:

Expected purchase amounts for this Trading Agreement for this Order or OrderItem. The amount is in the same currency of the Right-to-Buy Amount and Obligation-to-Buy Amount.

Parameters:
aAmount - java.math.BigDecimal

setAmount

public void setAmount(java.lang.String aAmount)

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

The following is a description of this column:

Expected purchase amounts for this Trading Agreement for this Order or OrderItem. The amount is in the same currency of the Right-to-Buy Amount and Obligation-to-Buy Amount.

Specified by:
setAmount in interface TradingPurchaseAmountAccessBeanData
Parameters:
aAmount - java.lang.String

setCurrency

public void setCurrency(java.lang.String aCurrency)

This method provides access to the TRDPURAMT.SETCCURR column of DB2 type CHAR(3) NULL.

The following is a description of this column:

Currency of the Amount field. This is a currency code as per ISO 4217 standards.

Specified by:
setCurrency in interface TradingPurchaseAmountAccessBeanData
Parameters:
aCurrency - java.lang.String

setInitKey_tradingPurchaseAmountId

public void setInitKey_tradingPurchaseAmountId(java.lang.String aInitKey_tradingPurchaseAmountId)

Set the primary key for this object

Parameters:
aInitKey_tradingPurchaseAmountId - java.lang.String

setOrderId

public void setOrderId(java.lang.Long aOrderId)

This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Order ID. Foreign key to the ORDERS table.

Parameters:
aOrderId - java.lang.Long

setOrderId

public void setOrderId(java.lang.String aOrderId)

This method provides access to the TRDPURAMT.ORDERS_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Order ID. Foreign key to the ORDERS table.

Specified by:
setOrderId in interface TradingPurchaseAmountAccessBeanData
Parameters:
aOrderId - java.lang.String

setOrderItemId

public void setOrderItemId(java.lang.Long aOrderItemId)

This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

ID of the OrderItem. This is set to null if all the OrderItems of the Order specify the same Trading ID. Foreign key to the ORDERITEMS table.

Parameters:
aOrderItemId - java.lang.Long

setOrderItemId

public void setOrderItemId(java.lang.String aOrderItemId)

This method provides access to the TRDPURAMT.ORDERITEMS_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

ID of the OrderItem. This is set to null if all the OrderItems of the Order specify the same Trading ID. Foreign key to the ORDERITEMS table.

Specified by:
setOrderItemId in interface TradingPurchaseAmountAccessBeanData
Parameters:
aOrderItemId - java.lang.String

setTradingId

public void setTradingId(java.lang.Long aTradingId)

This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

ID for the Trading Agreement. Foreign key to the TRADING table.

Parameters:
aTradingId - java.lang.Long

setTradingId

public void setTradingId(java.lang.String aTradingId)

This method provides access to the TRDPURAMT.TRADING_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

ID for the Trading Agreement. Foreign key to the TRADING table.

Specified by:
setTradingId in interface TradingPurchaseAmountAccessBeanData
Parameters:
aTradingId - java.lang.String

setTradingPurchaseAmountId

public void setTradingPurchaseAmountId(java.lang.Long aTradingPurchaseAmountId)

This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Generated unique key for this row.

Parameters:
aTradingPurchaseAmountId - java.lang.Long

setTradingPurchaseAmountId

public void setTradingPurchaseAmountId(java.lang.String aTradingPurchaseAmountId)

This method provides access to the TRDPURAMT.TRDPURAMT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Generated unique key for this row.

Specified by:
setTradingPurchaseAmountId in interface TradingPurchaseAmountAccessBeanData
Parameters:
aTradingPurchaseAmountId - java.lang.String