|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.samples.appprofile.accountmanagementejb.AccountBean
public abstract class AccountBean
The Account CMP EJB 2.0 Bean implements the EntityBean interface. It contains the buisness methods necessary to work with an Account. In addition to buisness methonds, it contains the Home Interface Methods, and Callback Methods.
Constructor Summary | |
---|---|
AccountBean()
|
Method Summary | |
---|---|
double |
add(double amount)
This remote method is used to add a given amount of money to an Account entry. |
void |
ejbActivate()
This required callback method is used for lifecycle notification. |
java.lang.String |
ejbCreate(java.lang.String accountId)
This Home Interface Method implementation is responsible for the creation of an Account entry. |
java.lang.String |
ejbCreate(java.lang.String accountId,
int type,
double balance,
double apr)
This Home Interface Method implementation is responsible for the creation of an Account entry. |
void |
ejbLoad()
This required callback method gets called after the EJB is loaded from the database. |
void |
ejbPassivate()
This required callback method is used for lifecycle notification. |
void |
ejbPostCreate(java.lang.String accountId)
This Home Interface Method is responsible for post creation steps, there are none for Account. |
void |
ejbPostCreate(java.lang.String accountId,
int type,
double balance,
double apr)
This Home Interface Method is responsible for post creation steps, there are none for Account. |
void |
ejbRemove()
Required callback method for Contaimer Managed Persistence. |
void |
ejbStore()
Required callback method for Contaimer Managed Persistence. |
abstract java.lang.String |
getAccountid()
This abstract CMP field accessor method returns the accountid attribute for an Account. |
abstract double |
getApr()
This abstract CMP field accessor method returns the apr attribute for an Account. |
abstract double |
getBalance()
This abstract CMP field accessor method returns the balance attribute for an Account. |
abstract int |
getType()
This abstract CMP field accessor method returns the type attribute for an Account. |
abstract void |
setAccountid(java.lang.String accountid)
This abstract CMP field accessor method set the accountid attribute for an Account. |
abstract void |
setApr(double apr)
This abstract CMP field accessor method set the apr attribute for an Account. |
abstract void |
setBalance(double balance)
This abstract CMP field accessor method set the balance attribute for an Account. |
void |
setEntityContext(javax.ejb.EntityContext ctx)
Required callback method for Container Managed Persistence. |
abstract void |
setType(int type)
This abstract CMP field accessor method set the type attribute for an Account. |
double |
subtract(double amount)
This remote method is used to substract a given amount of money from an Account entry. |
void |
unsetEntityContext()
Required callback method for Container Managed Persistence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AccountBean()
Method Detail |
---|
public abstract java.lang.String getAccountid()
public abstract void setAccountid(java.lang.String accountid)
accountid
- String object used as primary keypublic abstract int getType()
public abstract void setType(int type)
type
- set the type attribute of Account to this type parameterpublic abstract double getBalance()
public abstract void setBalance(double balance)
balance
- The value of balance attribute of Account should be after this operationpublic abstract double getApr()
public abstract void setApr(double apr)
apr
- The value of apr attribute of Account should be after this operationpublic java.lang.String ejbCreate(java.lang.String accountId) throws javax.ejb.CreateException
accountId
-
javax.ejb.CreateException
- This exception is thrown to indicate a failure to create the entity EJB.public void ejbPostCreate(java.lang.String accountId) throws javax.ejb.CreateException
accountId
- String object used as the primary key of the Account object, and used to set accountid attribute
javax.ejb.CreateException
public java.lang.String ejbCreate(java.lang.String accountId, int type, double balance, double apr) throws javax.ejb.CreateException
accountId
- String object as the primary key of Account beantype
- used to set type attributebalance
- used to set balance attributeapr
- used to set APR attribute
javax.ejb.CreateException
public void ejbPostCreate(java.lang.String accountId, int type, double balance, double apr) throws javax.ejb.CreateException
accountId
- String object used as the primary key of the Account object, and used to set accountid attributetype
- int used to set type attributebalance
- double used to set balance attributeapr
- double used to set APR attribute
javax.ejb.CreateException
- This exception is thrown to indicate a failure to create the entity EJB.public double add(double amount)
amount
- The amount should be added to balance attribute of the Account
public double subtract(double amount)
amount
- The amount should be substracted from balance attribute of the Account
public void setEntityContext(javax.ejb.EntityContext ctx)
setEntityContext
in interface javax.ejb.EntityBean
public void unsetEntityContext()
unsetEntityContext
in interface javax.ejb.EntityBean
public void ejbLoad()
ejbLoad
in interface javax.ejb.EntityBean
public void ejbRemove()
ejbRemove
in interface javax.ejb.EntityBean
public void ejbStore()
ejbStore
in interface javax.ejb.EntityBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.EntityBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.EntityBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |