|
|||||||||||
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,
java.util.Date hiredate)
Construct an Employee instance. |
|
Employee(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate,
IAddress address,
java.util.Date hiredate)
Construct 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(java.lang.Object other,
EqualityHelper helper)
Returns true if all the fields of this instance are
deep equal to the corresponding fields of the specified Employee. |
IDentalInsurance |
getDentalInsurance()
Get the dental insurance of the employee. |
IDepartment |
getDepartment()
Get the employee's department. |
protected java.lang.String |
getFieldRepr()
Returns a String representation of the non-relationship fields. |
IDepartment |
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. |
IEmployee |
getHradvisor()
Get the HR advisor for the employee. |
IEmployee |
getManager()
Get the employee's manager. |
IMedicalInsurance |
getMedicalInsurance()
Get the medical insurance of the employee. |
IEmployee |
getMentor()
Get the mentor for this employee. |
java.util.Set |
getProjects()
Get the employee's projects. |
IEmployee |
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(IDentalInsurance dentalInsurance)
Set the dental insurance object for the employee. |
void |
setDepartment(IDepartment department)
Set the employee's department. |
void |
setFundingDept(IDepartment 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 |
setHradvisor(IEmployee hradvisor)
Set the HR advisor for this employee. |
void |
setManager(IEmployee manager)
Set the employee's manager. |
void |
setMedicalInsurance(IMedicalInsurance medicalInsurance)
Set the medical insurance object for the employee. |
void |
setMentor(IEmployee mentor)
Set the mentor for this employee. |
void |
setProjects(java.util.Set projects)
Set the projects for the employee. |
void |
setProtege(IEmployee protege)
Set the protege for this 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. |
java.lang.String |
toString()
Return a String representation of a Employee object. |
Methods inherited from class org.apache.jdo.tck.pc.company.Person |
compare, compare, compareTo, compareTo, equals, getAddress, getBirthdate, getFirstname, getLastname, getMiddlename, getPersonid, getPhoneNumber, getPhoneNumbers, hashCode, putPhoneNumber, removePhoneNumber, setAddress, setBirthdate, setFirstname, setLastname, setLastname, setMiddlename, setPersonid, setPhoneNumbers |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.jdo.tck.pc.company.IPerson |
getAddress, getBirthdate, getFirstname, getLastname, getMiddlename, getPersonid, getPhoneNumbers, setAddress, setBirthdate, setFirstname, setLastname, setMiddlename, setPersonid, setPhoneNumbers |
Constructor Detail |
protected Employee()
public Employee(long personid, java.lang.String firstname, java.lang.String lastname, java.lang.String middlename, java.util.Date birthdate, 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.hiredate
- The date that the employee was hired.public Employee(long personid, java.lang.String firstname, java.lang.String lastname, java.lang.String middlename, java.util.Date birthdate, IAddress 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()
getHiredate
in interface IEmployee
public void setHiredate(java.util.Date hiredate)
setHiredate
in interface IEmployee
hiredate
- The date the employee was hired.public double getWeeklyhours()
getWeeklyhours
in interface IEmployee
public void setWeeklyhours(double weeklyhours)
setWeeklyhours
in interface IEmployee
weeklyhours
- The number of hours per week that the employee
works.public java.util.Set getReviewedProjects()
getReviewedProjects
in interface IEmployee
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)
setReviewedProjects
in interface IEmployee
reviewedProjects
- The set of reviewed projects.public java.util.Set getProjects()
getProjects
in interface IEmployee
public void addProject(Project project)
project
- The project.public void removeProject(Project project)
project
- The project.public void setProjects(java.util.Set projects)
setProjects
in interface IEmployee
projects
- The set of projects of the employee.public IDentalInsurance getDentalInsurance()
getDentalInsurance
in interface IEmployee
public void setDentalInsurance(IDentalInsurance dentalInsurance)
setDentalInsurance
in interface IEmployee
dentalInsurance
- The dental insurance object to associate with
the employee.public IMedicalInsurance getMedicalInsurance()
getMedicalInsurance
in interface IEmployee
public void setMedicalInsurance(IMedicalInsurance medicalInsurance)
setMedicalInsurance
in interface IEmployee
medicalInsurance
- The medical insurance object to associate
with the employee.public IDepartment getDepartment()
getDepartment
in interface IEmployee
public void setDepartment(IDepartment department)
setDepartment
in interface IEmployee
department
- The department.public IDepartment getFundingDept()
getFundingDept
in interface IEmployee
public void setFundingDept(IDepartment department)
setFundingDept
in interface IEmployee
department
- The funding department.public IEmployee getManager()
getManager
in interface IEmployee
public void setManager(IEmployee manager)
setManager
in interface IEmployee
manager
- The employee's manager.public java.util.Set getTeam()
getTeam
in interface IEmployee
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)
setTeam
in interface IEmployee
team
- The set of Employee
s.public void setMentor(IEmployee mentor)
setMentor
in interface IEmployee
mentor
- The mentor for this employee.public IEmployee getMentor()
getMentor
in interface IEmployee
public void setProtege(IEmployee protege)
setProtege
in interface IEmployee
protege
- The protege for this employee.public IEmployee getProtege()
getProtege
in interface IEmployee
public void setHradvisor(IEmployee hradvisor)
setHradvisor
in interface IEmployee
hradvisor
- The hradvisor for this employee.public IEmployee getHradvisor()
getHradvisor
in interface IEmployee
public java.util.Set getHradvisees()
getHradvisees
in interface IEmployee
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)
setHradvisees
in interface IEmployee
hradvisees
- The Employee
s that are HR advisees of
this employee.public java.lang.String toString()
Employee
object.
toString
in class Person
Employee
object.protected java.lang.String getFieldRepr()
getFieldRepr
in class Person
public boolean deepCompareFields(java.lang.Object 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 |