|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.tck.pc.company.Department
This class represents a department within a company.
Nested Class Summary | |
static class |
Department.Oid
The application identity class associated with the Department class. |
Constructor Summary | |
protected |
Department()
This is the JDO-required no-args constructor |
|
Department(long deptid,
java.lang.String name)
Initialize a Department instance. |
|
Department(long deptid,
java.lang.String name,
Company company)
Initialize a Department instance. |
|
Department(long deptid,
java.lang.String name,
Company company,
Employee employeeOfTheMonth)
Initialize a Department instance. |
Method Summary | |
void |
addEmployee(Employee emp)
Add an employee to the department. |
void |
addFundedEmp(Employee emp)
Add an employee to the collection of funded employees of this department. |
int |
compareTo(Department other)
Compares this object with the specified Department object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
deepCompareFields(DeepEquality other,
EqualityHelper helper)
Returns true if all the fields of this instance are
deep equal to the coresponding fields of the specified Person. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
Company |
getCompany()
Get the company associated with the department. |
long |
getDeptid()
Get the department id. |
Employee |
getEmployeeOfTheMonth()
Get the employee of the month associated with the department. |
java.util.Set |
getEmployees()
Get the employees in the department as an unmodifiable set. |
java.util.Set |
getFundedEmps()
Get the funded employees in the department as an unmodifiable set. |
java.lang.String |
getName()
Get the name of the department. |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeEmployee(Employee emp)
Remove an employee from the department. |
void |
removeFundedEmp(Employee emp)
Remove an employee from collection of funded employees of this department. |
void |
setCompany(Company company)
Set the company for the department. |
void |
setEmployeeOfTheMonth(Employee employeeOfTheMonth)
Set the employee of the month for the department. |
void |
setEmployees(java.util.Set employees)
Set the employees to be in this department. |
void |
setFundedEmps(java.util.Set employees)
Set the funded employees to be in this department. |
void |
setName(java.lang.String name)
Set the name of the department. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Department()
public Department(long deptid, java.lang.String name)
Department
instance.
deptid
- The department id.name
- The name of the department.public Department(long deptid, java.lang.String name, Company company)
Department
instance.
deptid
- The department id.name
- The name of the department.company
- The company that the department is associated with.public Department(long deptid, java.lang.String name, Company company, Employee employeeOfTheMonth)
Department
instance.
deptid
- The department id.name
- The name of the department.company
- The company that the department is associated with.employeeOfTheMonth
- The employee of the month the
department is associated with.Method Detail |
public long getDeptid()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set for the department.public Company getCompany()
public void setCompany(Company company)
company
- The company to associate with the department.public Employee getEmployeeOfTheMonth()
public void setEmployeeOfTheMonth(Employee employeeOfTheMonth)
employeeOfTheMonth
- The employee of the month to
associate with the department.public java.util.Set getEmployees()
public void addEmployee(Employee emp)
emp
- The employee to add to the department.public void removeEmployee(Employee emp)
emp
- The employee to remove from the department.public void setEmployees(java.util.Set employees)
employees
- The set of employees for this department.public java.util.Set getFundedEmps()
public void addFundedEmp(Employee emp)
emp
- The employee to add to the department.public void removeFundedEmp(Employee emp)
emp
- The employee to remove from the department.public void setFundedEmps(java.util.Set employees)
employees
- The set of funded employees for this department.public boolean deepCompareFields(DeepEquality other, EqualityHelper helper)
true
if all the fields of this instance are
deep equal to the coresponding fields of the specified Person.
deepCompareFields
in interface DeepEquality
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.public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- The Object to be compared.
java.lang.ClassCastException
- - if the specified object's type prevents
it from being compared to this Object.public int compareTo(Department other)
other
- The Department object to be compared.
public boolean equals(java.lang.Object obj)
obj
- the object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |