|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
it.mokabyte.pattern.ejb.entity.AccountBean
Title: AccountBean
Description: a Bank Account BMP
Copyright: Copyright (c) 2002
Company:
Field Summary | |
private double |
balance
The balance |
private it.mokabyte.pattern.ejb.entity.EntityContext |
ctx
The entity context for the bean, saved from setEntityContext |
private MyDao |
dao
The data access object |
private java.lang.String |
email
The email |
private java.lang.String |
name
The name |
Constructor Summary | |
AccountBean()
|
Method Summary | |
private void |
addItem(java.lang.String s)
Log message to console inserting date at the begin |
void |
ejbActivate()
|
AccountPK |
ejbCreate(java.lang.String id,
java.lang.String name,
java.lang.String address,
double balance)
Create a new Account with the given ID, name, address and balance. |
AccountPK |
ejbFindByPrimaryKey(AccountPK key)
Find an Account |
void |
ejbLoad()
Load this Account from the Database |
void |
ejbPassivate()
|
void |
ejbPostCreate(java.lang.String id,
java.lang.String name,
java.lang.String address,
double balance)
Post create settings |
void |
ejbRemove()
Remove this Account from the database |
void |
ejbStore()
Store this Account to the database |
java.lang.String |
getAccountID()
Returns current account ID |
double |
getBalance()
Returns current balance |
java.lang.String |
getEmail()
Returns current email. |
java.lang.String |
getName()
Returns current name |
void |
setBalance(double param)
Set this Account's balance |
void |
setEmail(java.lang.String param)
Set this Account's email |
void |
setEntityContext(it.mokabyte.pattern.ejb.entity.EntityContext ctx)
Set the context for this bean : save the context in ctx member |
void |
setName(java.lang.String param)
Set this Account's name |
void |
unsetEntityContext()
Unset the context for this bean. |
Field Detail |
private double balance
private java.lang.String name
private java.lang.String email
private it.mokabyte.pattern.ejb.entity.EntityContext ctx
private MyDao dao
Constructor Detail |
public AccountBean()
Method Detail |
public java.lang.String getAccountID()
public double getBalance()
public void setBalance(double param)
new
- balance valuepublic java.lang.String getName()
public void setName(java.lang.String param)
new
- name valuepublic java.lang.String getEmail()
public void setEmail(java.lang.String param)
new
- name valuepublic AccountPK ejbCreate(java.lang.String id, java.lang.String name, java.lang.String address, double balance) throws it.mokabyte.pattern.ejb.entity.CreateException
custID
- the ID for this accountacctType
- the account type for this accountbalance
- the balance for this Customerit.mokabyte.pattern.ejb.entity.CreateException
- thrown if the custID or acctType is null,
or the balance is negetive.public void ejbPostCreate(java.lang.String id, java.lang.String name, java.lang.String address, double balance) throws it.mokabyte.pattern.ejb.entity.CreateException
custID
- the ID for this accountacctType
- the account type for this accountbalance
- the balance for this Customerit.mokabyte.pattern.ejb.entity.CreateException
- never thrown - declared for sub-class usepublic void setEntityContext(it.mokabyte.pattern.ejb.entity.EntityContext ctx)
ctx
- the Entity Context for this beanpublic void unsetEntityContext()
public void ejbActivate()
public void ejbPassivate()
public void ejbLoad()
public void ejbStore()
public void ejbRemove() throws it.mokabyte.pattern.ejb.entity.RemoveException
public AccountPK ejbFindByPrimaryKey(AccountPK key) throws it.mokabyte.pattern.ejb.entity.FinderException
key
- the Account to findkey
)it.mokabyte.pattern.ejb.entity.FinderException
- thrown if this account already existsprivate void addItem(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |