|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.tck.pc.company.Person
org.apache.jdo.tck.pc.company.Employee
This class represents an employee.
Nested Class Summary |
Nested classes inherited from class org.apache.jdo.tck.pc.company.Person |
Person.Oid |
Field Summary |
Fields inherited from class org.apache.jdo.tck.pc.company.Person |
formatter |
Constructor Summary | |
protected |
Employee()
This is the JDO-required no-args constructor |
|
Employee(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate,
Address address,
java.util.Date hiredate)
Initialize an Employee instance. |
Method Summary | |
void |
addAdvisee(Employee emp)
Add an Employee as an advisee of this HR advisor. |
void |
addProject(Project project)
Add a project for the employee. |
void |
addReviewedProjects(Project project)
Add a reviewed project. |
void |
addToTeam(Employee emp)
Add an Employee to this employee's team. |
boolean |
deepCompareFields(DeepEquality other,
EqualityHelper helper)
Returns true if all the fields of this instance are
deep equal to the corresponding fields of the specified Employee. |
DentalInsurance |
getDentalInsurance()
Get the dental insurance of the employee. |
Department |
getDepartment()
Get the employee's department. |
Department |
getFundingDept()
Get the employee's funding department. |
java.util.Date |
getHiredate()
Get the date that the employee was hired. |
java.util.Set |
getHradvisees()
Get the HR advisees of this HR advisor. |
Employee |
getHradvisor()
Get the HR advisor for the employee. |
Employee |
getManager()
Get the employee's manager. |
MedicalInsurance |
getMedicalInsurance()
Get the medical insurance of the employee. |
Employee |
getMentor()
Get the mentor for this employee. |
java.util.Set |
getProjects()
Get the employee's projects. |
Employee |
getProtege()
Get the protege of this employee. |
java.util.Set |
getReviewedProjects()
Get the reviewed projects. |
java.util.Set |
getTeam()
Get the employee's team. |
double |
getWeeklyhours()
Get the weekly hours of the employee. |
void |
removeAdvisee(Employee emp)
Remove an Employee as an advisee of this HR advisor. |
void |
removeFromTeam(Employee emp)
Remove an Employee from this employee's team. |
void |
removeProject(Project project)
Remove a project from an employee's set of projects. |
void |
removeReviewedProject(Project project)
Remove a reviewed project. |
void |
setDentalInsurance(DentalInsurance dentalInsurance)
Set the dental insurance object for the employee. |
void |
setDepartment(Department department)
Set the employee's department. |
void |
setFundingDept(Department department)
Set the employee's funding department. |
void |
setHiredate(java.util.Date hiredate)
Set the date that the employee was hired. |
void |
setHradvisees(java.util.Set hradvisees)
Set the HR advisees of this HR advisor. |
void |
setManager(Employee manager)
Set the employee's manager. |
void |
setMedicalInsurance(MedicalInsurance medicalInsurance)
Set the medical insurance object for the employee. |
void |
setMentor(Employee mentor)
Set the mentor for this employee and also set the inverse protege relationship. |
void |
setProjects(java.util.Set projects)
Set the projects for the employee. |
void |
setReviewedProjects(java.util.Set reviewedProjects)
Set the reviewed projects for the employee. |
void |
setTeam(java.util.Set team)
Set the employee's team. |
void |
setWeeklyhours(double weeklyhours)
Set the number of hours per week that the employee works. |
Methods inherited from class org.apache.jdo.tck.pc.company.Person |
compareTo, compareTo, equals, getAddress, getBirthdate, getFirstname, getLastname, getMiddlename, getPersonid, getPhoneNumber, getPhoneNumbers, hashCode, putPhoneNumber, removePhoneNumber, setAddress, setBirthdate, setFirstname, setLastname, setLastname, setMiddlename, setPhoneNumbers, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Employee()
public Employee(long personid, java.lang.String firstname, java.lang.String lastname, java.lang.String middlename, java.util.Date birthdate, Address address, java.util.Date hiredate)
Employee
instance.
personid
- The identifier for the person.firstname
- The first name of the employee.lastname
- The last name of the employee.middlename
- The middle name of the employee.birthdate
- The birth date of the employee.address
- The address of the employee.hiredate
- The date that the employee was hired.Method Detail |
public java.util.Date getHiredate()
public void setHiredate(java.util.Date hiredate)
hiredate
- The date the employee was hired.public double getWeeklyhours()
public void setWeeklyhours(double weeklyhours)
weeklyhours
- The number of hours per week that the employee
works.public java.util.Set getReviewedProjects()
public void addReviewedProjects(Project project)
project
- A reviewed project.public void removeReviewedProject(Project project)
project
- A reviewed project.public void setReviewedProjects(java.util.Set reviewedProjects)
reviewedProjects
- The set of reviewed projects.public java.util.Set getProjects()
public void addProject(Project project)
project
- The project.public void removeProject(Project project)
project
- The project.public void setProjects(java.util.Set projects)
projects
- The set of projects of the employee.public DentalInsurance getDentalInsurance()
public void setDentalInsurance(DentalInsurance dentalInsurance)
dentalInsurance
- The dental insurance object to associate with
the employee.public MedicalInsurance getMedicalInsurance()
public void setMedicalInsurance(MedicalInsurance medicalInsurance)
medicalInsurance
- The medical insurance object to associate
with the employee.public Department getDepartment()
public void setDepartment(Department department)
department
- The department.public Department getFundingDept()
public void setFundingDept(Department department)
department
- The funding department.public Employee getManager()
public void setManager(Employee manager)
manager
- The employee's manager.public java.util.Set getTeam()
Employee
s on this employee's team,
returned as an unmodifiable set.public void addToTeam(Employee emp)
Employee
to this employee's team.
This method sets both sides of the relationship, modifying
this employees team to include parameter emp and modifying
emp to set its manager attribute to this object.
emp
- The Employee
to add to the team.public void removeFromTeam(Employee emp)
Employee
from this employee's team.
This method will also set the emp
manager to null.
emp
- The Employee
to remove from the team.public void setTeam(java.util.Set team)
team
- The set of Employee
s.public void setMentor(Employee mentor)
mentor
- The mentor for this employee.public Employee getMentor()
public Employee getProtege()
public Employee getHradvisor()
public java.util.Set getHradvisees()
Set
containing the
Employee
s that are HR advisees of this employee.public void addAdvisee(Employee emp)
Employee
as an advisee of this HR advisor.
This method also sets the emp
hradvisor to reference
this object. In other words, both sides of the relationship are
set.
emp
- The employee to add as an advisee.public void removeAdvisee(Employee emp)
Employee
as an advisee of this HR advisor.
This method also sets the emp
hradvisor to null.
In other words, both sides of the relationship are set.
emp
- The employee to add as an HR advisee.public void setHradvisees(java.util.Set hradvisees)
hradvisees
- The Employee
s that are HR advisees of
this employee.public boolean deepCompareFields(DeepEquality other, EqualityHelper helper)
true
if all the fields of this instance are
deep equal to the corresponding fields of the specified Employee.
deepCompareFields
in interface DeepEquality
deepCompareFields
in class Person
other
- the object with which to compare.helper
- EqualityHelper to keep track of instances that have
already been processed.
true
if all the fields are deep equal;
false
otherwise.
java.lang.ClassCastException
- if the specified instances' type prevents
it from being compared to this instance.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |