com.ibm.commerce.payment.objects
Class BuyerPurchaseOrderAccessBean

java.lang.Object
  com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
      com.ibm.commerce.payment.objects.BuyerPurchaseOrderAccessBean
All Implemented Interfaces:
BuyerPurchaseOrderAccessBeanData

public class BuyerPurchaseOrderAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements BuyerPurchaseOrderAccessBeanData

Each row of this table represents a Purchase Order Number that the Buyer organization of the Account has defined or used for Trading with the Seller organization. The number is only unique within the Account. This access bean corresponds to the database table 'BUYERPO'.

See Also:
Serialized Form

Constructor Summary
BuyerPurchaseOrderAccessBean()
Zero argument constructor used to initialize the access bean.
BuyerPurchaseOrderAccessBean(javax.ejb.EJBObject o)
constructor
BuyerPurchaseOrderAccessBean(java.lang.Long newAccountId, java.lang.String newPurchaseOrderNumber, java.lang.Integer newBuyerPurchaseOrderTypeId)
Maps to a corresponding ejbCreate method in the home interface of the EJB
BuyerPurchaseOrderAccessBean(java.lang.Long newAccountId, java.lang.String newPurchaseOrderNumber, java.lang.Integer newBuyerPurchaseOrderTypeId, java.lang.Integer newState, java.math.BigDecimal newAmount, java.lang.String newCurrency)
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).
protected java.lang.String defaultJNDIName()
BuyerPurchaseOrderAccessBean findByAccountIdAndPurchaseOrderNumber(java.lang.Long accountId, java.lang.String purchaseOrderNumber)
Retrieves the BuyerPurchaseOrder AccessBean with the specified Purchase Order Number that has been registered with the Account.
java.lang.String getAccountId()
This method provides access to the BUYERPO.ACCOUNT_ID column of DB2 type BIGINT.
java.lang.Long getAccountIdInEJBType()
This method provides access to the BUYERPO.ACCOUNT_ID column of DB2 type BIGINT.
java.lang.String getAmount()
This method provides access to the BUYERPO.AMOUNT column of DB2 type DECIMAL(20 5).
java.math.BigDecimal getAmountInEJBType()
This method provides access to the BUYERPO.AMOUNT column of DB2 type DECIMAL(20 5).
java.lang.String getBuyerPurchaseOrderId()
This method provides access to the BUYERPO.BUYERPO_ID column of DB2 type BIGINT NOT NULL.
java.lang.Long getBuyerPurchaseOrderIdInEJBType()
This method provides access to the BUYERPO.BUYERPO_ID column of DB2 type BIGINT NOT NULL.
java.lang.String getBuyerPurchaseOrderTypeId()
This method provides access to the BUYERPO.BUYERPOTYP_ID column of DB2 type INTEGER NOT NULL.
java.lang.Integer getBuyerPurchaseOrderTypeIdInEJBType()
This method provides access to the BUYERPO.BUYERPOTYP_ID column of DB2 type INTEGER NOT NULL.
java.lang.String getCurrency()
This method provides access to the BUYERPO.SETCCURR column of DB2 type CHAR(3).
java.lang.String getPurchaseOrderNumber()
This method provides access to the BUYERPO.PONUMBER column of DB2 type VARCHAR(128) NOT NULL.
java.lang.String getState()
This method provides access to the BUYERPO.STATE column of DB2 type INTEGER DEFAULT 0.
java.lang.Integer getStateInEJBType()
This method provides access to the BUYERPO.STATE column of DB2 type INTEGER DEFAULT 0.
protected void instantiateEJB()
protected boolean instantiateEJBByPrimaryKey()
void refreshCopyHelper()
Load data from the EJBObject.
void setAccountId(java.lang.Long newValue)
This method accesses a non-CMP field
void setAccountId(java.lang.String newValue)
This method accesses a non-CMP field
void setAmount(java.math.BigDecimal newValue)
This method accesses a non-CMP field
void setAmount(java.lang.String newValue)
This method accesses a non-CMP field
void setBuyerPurchaseOrderId(java.lang.Long newValue)
This method accesses a non-CMP field
void setBuyerPurchaseOrderId(java.lang.String newValue)
This method accesses a non-CMP field
void setBuyerPurchaseOrderTypeId(java.lang.Integer newValue)
This method accesses a non-CMP field
void setBuyerPurchaseOrderTypeId(java.lang.String newValue)
This method accesses a non-CMP field
void setCurrency(java.lang.String newValue)
This method accesses a non-CMP field
void setInitKey_buyerPurchaseOrderId(java.lang.String newValue)
Set the primary key for this object
void setPurchaseOrderNumber(java.lang.String newValue)
This method accesses a non-CMP field
void setState(java.lang.Integer newValue)
This method accesses a non-CMP field
void setState(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

BuyerPurchaseOrderAccessBean

public BuyerPurchaseOrderAccessBean()
Zero argument constructor used to initialize the access bean. This constructor corresponds to the following home interface method: public abstract com.ibm.commerce.payment.objects.BuyerPurchaseOrder com.ibm.commerce.payment.objimpl.BuyerPurchaseOrderHomeBase.findByPrimaryKey(com.ibm.commerce.payment.objects.BuyerPurchaseOrderKey) 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_buyerPurchaseOrderId( java.lang.Long )

BuyerPurchaseOrderAccessBean

public BuyerPurchaseOrderAccessBean(java.lang.Long newAccountId,
                                    java.lang.String newPurchaseOrderNumber,
                                    java.lang.Integer newBuyerPurchaseOrderTypeId)
                             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:
newAccountId - The ID of the Account.
newPurchaseOrderNumber - The Purchase Order Number.
newBuyerPurchaseOrderTypeId - An integer representing the type of BuyerPO to be created and registered to the Account.
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

BuyerPurchaseOrderAccessBean

public BuyerPurchaseOrderAccessBean(java.lang.Long newAccountId,
                                    java.lang.String newPurchaseOrderNumber,
                                    java.lang.Integer newBuyerPurchaseOrderTypeId,
                                    java.lang.Integer newState,
                                    java.math.BigDecimal newAmount,
                                    java.lang.String newCurrency)
                             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:
newAccountId - The ID of the Account.
newPurchaseOrderNumber - The Purchase Order Number.
newBuyerPurchaseOrderTypeId - An integer representing the type of BuyerPO to be created and registered to the Account.
newState - The newState of the BuyerPO to be created.
newAmount - The maximum newAmount that can be purchased with this purchase order.
newCurrency - The newAmount newCurrency.
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

BuyerPurchaseOrderAccessBean

public BuyerPurchaseOrderAccessBean(javax.ejb.EJBObject o)
                             throws java.rmi.RemoteException
constructor
Parameters:
o - javax.ejb.EJBObject
Throws:
java.rmi.RemoteException
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).

Returns:
void
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

defaultJNDIName

protected java.lang.String defaultJNDIName()
Returns:
String

findByAccountIdAndPurchaseOrderNumber

public BuyerPurchaseOrderAccessBean findByAccountIdAndPurchaseOrderNumber(java.lang.Long accountId,
                                                                          java.lang.String purchaseOrderNumber)
                                                                   throws java.rmi.RemoteException,
                                                                          javax.ejb.FinderException,
                                                                          javax.naming.NamingException

Retrieves the BuyerPurchaseOrder AccessBean with the specified Purchase Order Number that has been registered with the Account.

The SQL query used to fetch the requested row from the BUYERPO table is:

SELECT * FROM BUYERPO T1 WHERE T1.ACCOUNT_ID=? AND T1.PONUMBER=?

Parameters:
accountId - The ID of the account.
purchaseOrderNumber - The purchase order number.
Returns:
com.ibm.commerce.payment.objects.BuyerPurchaseOrderAccessBean
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException

getAccountId

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

This method provides access to the BUYERPO.ACCOUNT_ID column of DB2 type BIGINT.

The following is a description of this column:

The ID of the business account to which the Buyer Purchase Order Number belongs. Foreign key to the ACCOUNT table.

Specified by:
getAccountId in interface BuyerPurchaseOrderAccessBeanData
Returns:
String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getAccountIdInEJBType

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

This method provides access to the BUYERPO.ACCOUNT_ID column of DB2 type BIGINT.

The following is a description of this column:

The ID of the business account to which the Buyer Purchase Order Number belongs. Foreign key to the ACCOUNT table.

Returns:
java.lang.Long
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

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 BUYERPO.AMOUNT column of DB2 type DECIMAL(20 5).

The following is a description of this column:

Amount for Limited Purchase Order.

Specified by:
getAmount in interface BuyerPurchaseOrderAccessBeanData
Returns:
String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

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 BUYERPO.AMOUNT column of DB2 type DECIMAL(20 5).

The following is a description of this column:

Amount for Limited Purchase Order.

Returns:
java.math.BigDecimal
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getBuyerPurchaseOrderId

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

This method provides access to the BUYERPO.BUYERPO_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Generated unique key for this row.

Specified by:
getBuyerPurchaseOrderId in interface BuyerPurchaseOrderAccessBeanData
Returns:
String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getBuyerPurchaseOrderIdInEJBType

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

This method provides access to the BUYERPO.BUYERPO_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
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getBuyerPurchaseOrderTypeId

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

This method provides access to the BUYERPO.BUYERPOTYP_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Type of the Buyer Purchase Order Number. The types are defined in the BUYERPOTYP table.

Specified by:
getBuyerPurchaseOrderTypeId in interface BuyerPurchaseOrderAccessBeanData
Returns:
String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getBuyerPurchaseOrderTypeIdInEJBType

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

This method provides access to the BUYERPO.BUYERPOTYP_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Type of the Buyer Purchase Order Number. The types are defined in the BUYERPOTYP table.

Returns:
java.lang.Integer
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

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 BUYERPO.SETCCURR column of DB2 type CHAR(3).

The following is a description of this column:

Currency of the Amount field. Alphabetic currency code as per ISO 4217.

Specified by:
getCurrency in interface BuyerPurchaseOrderAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getPurchaseOrderNumber

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

This method provides access to the BUYERPO.PONUMBER column of DB2 type VARCHAR(128) NOT NULL.

The following is a description of this column:

The Buyer Purchase Order Number.

Specified by:
getPurchaseOrderNumber in interface BuyerPurchaseOrderAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getState

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

This method provides access to the BUYERPO.STATE column of DB2 type INTEGER DEFAULT 0.

The following is a description of this column:

State of the Purchase Order Number: 0=Undefined, 1=Active, available for Order, 2=Closed, cannot be used for Order.

Specified by:
getState in interface BuyerPurchaseOrderAccessBeanData
Returns:
String
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

getStateInEJBType

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

This method provides access to the BUYERPO.STATE column of DB2 type INTEGER DEFAULT 0.

The following is a description of this column:

State of the Purchase Order Number: 0=Undefined, 1=Active, available for Order, 2=Closed, cannot be used for Order.

Returns:
java.lang.Integer
Throws:
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.FinderException
javax.naming.NamingException

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

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

setAccountId

public void setAccountId(java.lang.Long newValue)
This method accesses a non-CMP field

setAccountId

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

setAmount

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

setAmount

public void setAmount(java.math.BigDecimal newValue)
This method accesses a non-CMP field

setBuyerPurchaseOrderId

public void setBuyerPurchaseOrderId(java.lang.Long newValue)
This method accesses a non-CMP field

setBuyerPurchaseOrderId

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

setBuyerPurchaseOrderTypeId

public void setBuyerPurchaseOrderTypeId(java.lang.Integer newValue)
This method accesses a non-CMP field

setBuyerPurchaseOrderTypeId

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

setCurrency

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

setInitKey_buyerPurchaseOrderId

public void setInitKey_buyerPurchaseOrderId(java.lang.String newValue)

Set the primary key for this object

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

setPurchaseOrderNumber

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

setState

public void setState(java.lang.Integer newValue)
This method accesses a non-CMP field

setState

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

Feedback