|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.samples.ejbquery.employeefinderejb.EmpBean
public abstract class EmpBean
The EmpBean CMP EJB Bean implements the EntityBean interface. It contains the accessor and business methods necessary to work with an Emp. In addition, it contains the Home Interface Methods, and Callback Methods.
Field Summary | |
---|---|
protected javax.ejb.EntityContext |
entityContext
|
Constructor Summary | |
---|---|
EmpBean()
|
Method Summary | |
---|---|
int |
add1()
add1 method returns empid + 1. |
double |
calcBonus(double profitFactor)
calcBonus method calculates an employee's annual bonus given a positive profitFactor. |
void |
ejbActivate()
ejbActivate required callback method for lifecycle notification. |
EmpKey |
ejbCreate(java.lang.Integer empid)
ejbCreate method responsible for the creation of a skeleton Emp. |
EmpKey |
ejbCreate(java.lang.Integer empid,
java.lang.String name,
double salary,
double bonus,
java.sql.Date hireDate,
java.sql.Time hireTime,
java.sql.Timestamp hireTimestamp,
boolean isManager)
ejbCreate method responsible for the creation of an Emp. |
void |
ejbLoad()
ejbLoad required callback method gets called after the EJB is loaded from the database. |
void |
ejbPassivate()
ejbPassivate required callback method for lifecycle notification. |
void |
ejbPostCreate(EmpKey key)
ejbPostCreate Home Interface Method responsible for post creation steps, there are none for Emp. |
void |
ejbPostCreate(java.lang.Integer empid)
ejbPostCreate method responsible for the post creation of a skeleton Emp. |
void |
ejbPostCreate(java.lang.Integer empid,
java.lang.String name,
double salary,
double bonus,
java.sql.Date hireDate,
java.sql.Time hireTime,
java.sql.Timestamp hireTimestamp,
boolean isManager)
ejbPostCreate method responsible for the post creation of an Emp. |
void |
ejbRemove()
ejbRemove required callback method for Contaimer Managed Persistence. |
void |
ejbStore()
ejbStore required callback method for Contaimer Managed Persistence. |
abstract double |
getBonus()
This abstract CMP field accessor method gets the bonus attribute. |
abstract DeptLocal |
getDept()
This abstract CMR field accessor method gets the dept attribute. |
abstract java.lang.Integer |
getEmpid()
This abstract CMP field accessor method gets the empid attribute. |
abstract java.sql.Date |
getHireDate()
This abstract CMP field accessor method gets the hireDate attribute. |
abstract java.sql.Time |
getHireTime()
This abstract CMP field accessor method gets the hireTime attribute. |
abstract java.sql.Timestamp |
getHireTimestamp()
This abstract CMP field accessor method gets the hireTimestamp attribute. |
abstract boolean |
getIsManager()
This abstract CMP field accessor method gets the isManager attribute. |
abstract java.lang.String |
getName()
This abstract CMP field accessor method gets the name attribute. |
abstract double |
getSalary()
This abstract CMP field accessor method gets the salary attribute. |
abstract void |
setBonus(double bonus)
This abstract CMP field accessor method sets the bonus attribute. |
abstract void |
setDept(DeptLocal newDept)
This abstract CMR field accessor method sets the dept attribute. |
abstract void |
setEmpid(java.lang.Integer empid)
This abstract CMP field accessor method sets the empid attribute. |
void |
setEntityContext(javax.ejb.EntityContext ctx)
setEntityContext required callback method for Container Managed Persistence. |
abstract void |
setHireDate(java.sql.Date hireDate)
This abstract CMP field accessor method sets the hireDate attribute. |
abstract void |
setHireTime(java.sql.Time hireTime)
This abstract CMP field accessor method sets the hireTime attribute. |
abstract void |
setHireTimestamp(java.sql.Timestamp hireTimestamp)
This abstract CMP field accessor method sets the hireTimestamp attribute. |
abstract void |
setIsManager(boolean isManager)
This abstract CMP field accessor method sets the isManager attribute. |
abstract void |
setName(java.lang.String name)
This abstract CMP field accessor method sets the name attribute. |
abstract void |
setSalary(double salary)
This abstract CMP field accessor method sets the salary attribute. |
void |
unsetEntityContext()
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 |
Field Detail |
---|
protected javax.ejb.EntityContext entityContext
Constructor Detail |
---|
public EmpBean()
Method Detail |
---|
public abstract java.lang.Integer getEmpid()
public abstract void setEmpid(java.lang.Integer empid)
empid
- java.lang.Integerpublic abstract java.lang.String getName()
public abstract void setName(java.lang.String name)
name
- java.lang.Stringpublic abstract double getSalary()
public abstract void setSalary(double salary)
salary
- doublepublic abstract double getBonus()
public abstract void setBonus(double bonus)
bonus
- doublepublic abstract java.sql.Date getHireDate()
public abstract void setHireDate(java.sql.Date hireDate)
hireDate
- java.sql.Datepublic abstract java.sql.Time getHireTime()
public abstract void setHireTime(java.sql.Time hireTime)
hireTime
- java.sql.Timepublic abstract java.sql.Timestamp getHireTimestamp()
public abstract void setHireTimestamp(java.sql.Timestamp hireTimestamp)
hireTimestamp
- java.sql.Timestamppublic abstract boolean getIsManager()
public abstract void setIsManager(boolean isManager)
isManager
- booleanpublic abstract DeptLocal getDept()
public abstract void setDept(DeptLocal newDept)
newDept
- DeptLocalpublic int add1()
public double calcBonus(double profitFactor)
profitFactor
- the fractional increase of the value of the company during the current the year
public EmpKey ejbCreate(java.lang.Integer empid) throws javax.ejb.CreateException
empid
- java.lang.Integer
javax.ejb.CreateException
- This exception is thrown to
indicate a failure to create the entity EJB.public EmpKey ejbCreate(java.lang.Integer empid, java.lang.String name, double salary, double bonus, java.sql.Date hireDate, java.sql.Time hireTime, java.sql.Timestamp hireTimestamp, boolean isManager) throws javax.ejb.CreateException
empid
- java.lang.Integername
- java.lang.Stringsalary
- doublebonus
- doublehireDate
- java.sql.DatehireTime
- java.sql.TimehireTimestamp
- java.sql.TimestampisManager
- boolean
javax.ejb.CreateException
- This exception is thrown to
indicate a failure to create the entity EJB.public void ejbPostCreate(java.lang.Integer empid) throws javax.ejb.CreateException
empid
- java.lang.Integer
javax.ejb.CreateException
- This exception is thrown to
indicate a failure to post create the entity EJB.public void ejbPostCreate(java.lang.Integer empid, java.lang.String name, double salary, double bonus, java.sql.Date hireDate, java.sql.Time hireTime, java.sql.Timestamp hireTimestamp, boolean isManager) throws javax.ejb.CreateException
empid
- java.lang.Integername
- java.lang.Stringsalary
- doublebonus
- doublehireDate
- java.sql.DatehireTime
- java.sql.TimehireTimestamp
- java.sql.TimestampisManager
- boolean
javax.ejb.CreateException
- This exception is thrown to
indicate a failure to post create the entity EJB.public void ejbPostCreate(EmpKey key) throws javax.ejb.CreateException
key
- EmpKey
javax.ejb.CreateException
- This exception is thrown to
indicate a failure to post create the entity EJB.public void setEntityContext(javax.ejb.EntityContext ctx) throws javax.ejb.EJBException
setEntityContext
in interface javax.ejb.EntityBean
ctx
- javax.ejb.EntityContext
javax.ejb.EJBException
- This exception is thrown to
indicate a failure to create the entity EJB.public void unsetEntityContext() throws javax.ejb.EJBException
unsetEntityContext
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.public void ejbLoad() throws javax.ejb.EJBException
ejbLoad
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.public void ejbStore() throws javax.ejb.EJBException
ejbStore
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.public void ejbRemove() throws javax.ejb.EJBException, javax.ejb.RemoveException
ejbRemove
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.
javax.ejb.RemoveException
- Signals that a Remove exception can occur.public void ejbActivate() throws javax.ejb.EJBException
ejbActivate
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.public void ejbPassivate() throws javax.ejb.EJBException
ejbPassivate
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Signals that an EJB exception can occur.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |