|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--samples.j2ee.ejb.sequence.oracle.OracleBean
OracleBean is an EntityBean. This EJBean illustrates:
| Field Summary | |
int |
accountId
|
static int |
lastKey
|
static int |
maxKey
|
double |
salary
|
| Constructor Summary | |
OracleBean()
|
|
| Method Summary | |
java.lang.Integer |
accountId()
Returns account ID. |
void |
ejbActivate()
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbCreate(double initialSalary)
This method corresponds to the create method in the home interface "OracleHome.java". |
void |
ejbCreate(java.lang.Integer accountId,
double initialSalary)
This method corresponds to the create method in the home interface "OracleHome.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(double initialSalary)
This method is required by the EJB Specification, but is not used by this example. |
void |
ejbPostCreate(java.lang.Integer accountId,
double initialSalary)
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()
This method is required by the EJB Specification, but is not used by this example. |
double |
salary()
Returns current salary. |
void |
setEntityContext(javax.ejb.EntityContext ctx)
Sets the EntityContext for the EJBean. |
void |
unsetEntityContext()
Unsets the EntityContext for the EJBean. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public int accountId
public double salary
public static int lastKey
public static int maxKey
| Constructor Detail |
public OracleBean()
| Method Detail |
public void ejbActivate()
public void ejbPassivate()
public void setEntityContext(javax.ejb.EntityContext ctx)
ctx - EntityContext
public void unsetEntityContext()
throws java.rmi.RemoteException
public void ejbLoad()
public void ejbStore()
public void ejbRemove()
throws javax.ejb.RemoveException
public void ejbCreate(java.lang.Integer accountId,
double initialSalary)
throws javax.ejb.CreateException
OracleHome.create(), the container (which in WebLogic EJB is
also the home) allocates an instance of this EJBean and
calls OracleBean.ejbCreate().
For container-managed persistence, ejbCreate() returns
a void, unlike the case of bean-managed
persistence, where it returns a primary key.
accountID - Integer Account IDinitialSalary - double Initial salary
public void ejbCreate(double initialSalary)
throws javax.ejb.CreateException
OracleHome.create(), the container (which in WebLogic EJB is
also the home) allocates an instance of this bean and
calls OracleBean.ejbCreate().
For bean-managed persistence, ejbCreate() returns
a primary key, unlike the case of container-managed
persistence, where it returns a void.
Unlike the ejbCreate(Integer accountId, double initialSalary),
this version creates a new AccountID using getNewAccountId().
initialSalary - double Initial Salary
public void ejbPostCreate(java.lang.Integer accountId,
double initialSalary)
accountID - Integer Account IdentificationinitialSalary - double Initial Salarypublic void ejbPostCreate(double initialSalary)
initialSalary - double Initial Salarypublic double salary()
public java.lang.Integer accountId()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||