|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.samples.appprofile.accountmanagementejb.AccountManagerBean
public class AccountManagerBean
The AccountManagerBean implements the SessionBean interface. It contains the buisness methods necessary to manage Accounts In addition to buisness methonds, it contains the Home Interface Methods, and Callback Methods.
Field Summary | |
---|---|
protected LocalAccountHome |
accountLocalHome
The LocalAccountHome object. |
protected javax.naming.InitialContext |
initialContext
The InitialContext Object used to do jndi lookup |
protected java.lang.String |
lookupString
The String, java:comp/env/ejb/AppProfileSample-AccountHome, is used to lookup AccountHome. |
Constructor Summary | |
---|---|
AccountManagerBean()
|
Method Summary | |
---|---|
int |
createAccounts(int number)
This remote method is used to create a number of Account entity beans. |
void |
ejbActivate()
Required callback method for Contaimer Managed Persistence. |
void |
ejbCreate()
This Home Interface Method implementation is responsible for the creation of an AccountManager. |
void |
ejbPassivate()
Required callback method for Contaimer Managed Persistence. |
void |
ejbRemove()
Required callback method for Contaimer Managed Persistence. |
java.lang.String |
getAccount(java.lang.String accountid)
This remote method is used to get an Account record in String format, given the primary key account id. |
int |
getAccountsNumber()
This remote method is used to get the number of total accounts. |
java.lang.String[] |
getLargeAccounts(double balance)
This remote method is used to get a collection of Account records in String format that meet the minimum balance condition |
int |
increaseLargeAccountsAPR(double balance,
double change)
This remote method is used to increase the APR by the passed in apr parameter on all large accounts with balance greater than the passed in balance parameter. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Required callback method for Contaimer Managed Persistence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.naming.InitialContext initialContext
protected java.lang.String lookupString
protected LocalAccountHome accountLocalHome
Constructor Detail |
---|
public AccountManagerBean()
Method Detail |
---|
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
- This exception is thrown to indicate a failure to create the entity EJB.public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext
in interface javax.ejb.SessionBean
public int createAccounts(int number)
number
- the number of Accounts needed to be created
public java.lang.String[] getLargeAccounts(double balance)
balance
- the required minimum balance condition
public int increaseLargeAccountsAPR(double balance, double change)
balance
- the required minimum balance conditionchange
- indicates how much the apr should increase
public java.lang.String getAccount(java.lang.String accountid)
accountid
- String object represent the primary key of an Account
public int getAccountsNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |