|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.iiop.ejb.entity.server.wls.AccountBean
Date AccountBean is an EntityBean. This EJBean illustrates:
Field Summary | |
java.lang.String |
accountId
|
java.lang.String |
accountType
|
double |
balance
|
(package private) static boolean |
VERBOSE
|
Constructor Summary | |
AccountBean()
|
Method Summary | |
java.lang.String |
accountType()
Returns the account type. |
double |
balance()
Returns current balance. |
double |
deposit(double amount)
Adds amount to balance. |
void |
ejbActivate()
This method is required by the EJB Specification, but is not used by this example. |
java.lang.String |
ejbCreate(java.lang.String accountId,
double initialBalance,
java.lang.String type)
This method corresponds to the create method in the home interface "AccountHome.java". |
void |
ejbLoad()
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbPassivate()
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbPostCreate(java.lang.String accountId,
double initialBalance,
java.lang.String type)
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbRemove()
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbStore()
Sets the EJBean's modified flag to false. |
boolean |
isModified()
Returns whether the EJBean has been modified or not. |
void |
setEntityContext(javax.ejb.EntityContext ctx)
Sets the EntityContext for the EJBean. |
void |
setModified(boolean flag)
Sets the EJBean's modified flag. |
java.util.List |
test_seq(java.util.Vector ig)
|
void |
unsetEntityContext()
Unsets the EntityContext for the EJBean. |
double |
withdraw(double amount)
Subtracts amount from balance. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public java.lang.String accountId
public java.lang.String accountType
public double balance
static final boolean VERBOSE
Constructor Detail |
public AccountBean()
Method Detail |
public java.lang.String accountType()
public double balance()
public double deposit(double amount)
amount
- double Amountpublic void ejbActivate()
ejbActivate
in interface javax.ejb.EntityBean
public java.lang.String ejbCreate(java.lang.String accountId, double initialBalance, java.lang.String type) throws javax.ejb.CreateException
AccountHome.create()
, the container (which in WebLogic EJB is
also the home) allocates an instance of this EJBean and
calls AccountBean.ejbCreate()
.
For container-managed persistence, ejbCreate()
returns
a null, unlike the case of bean-managed
persistence, where it returns a primary key.
accountID
- String Account IDinitialBalance
- double Initial Balancejavax.ejb.CreateException
- if there is a problem creating the beanpublic void ejbLoad()
ejbLoad
in interface javax.ejb.EntityBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.EntityBean
public void ejbPostCreate(java.lang.String accountId, double initialBalance, java.lang.String type)
accountID
- String Account IdentificationinitialBalance
- double Initial Balancetype
- String Account typepublic void ejbRemove() throws javax.ejb.RemoveException
ejbRemove
in interface javax.ejb.EntityBean
javax.ejb.RemoveException
- if the EJBean does not allow removing the EJBeanpublic void ejbStore()
ejbStore
in interface javax.ejb.EntityBean
public boolean isModified()
public void setEntityContext(javax.ejb.EntityContext ctx)
setEntityContext
in interface javax.ejb.EntityBean
ctx
- EntityContextpublic void setModified(boolean flag)
flag
- Modified Flagpublic java.util.List test_seq(java.util.Vector ig)
public void unsetEntityContext()
unsetEntityContext
in interface javax.ejb.EntityBean
public double withdraw(double amount) throws ProcessingErrorException
amount
- double AmountProcessingErrorException
- if Amount > Balance
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |