|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.tck.pc.company.Project
This class represents a project, a budgeted task with one or more employees working on it.
Nested Class Summary | |
static class |
Project.Oid
This class is used to represent the application identity for the Project class. |
Constructor Summary | |
protected |
Project()
This is the JDO-required no-args constructor. |
|
Project(long projid,
java.lang.String name,
java.math.BigDecimal budget)
Initialize a project. |
Method Summary | |
void |
addMember(Employee emp)
Add a new member to the project. |
void |
addReviewer(Employee emp)
Add a reviewer to the project. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(Project other)
Compares this object with the specified Project 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. |
java.math.BigDecimal |
getBudget()
Get the project's budget. |
java.util.Set |
getMembers()
Get the project members. |
java.lang.String |
getName()
Get the name of the project. |
long |
getProjid()
Get the project ID. |
java.util.Set |
getReviewers()
Get the reviewers associated with this project. |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeMember(Employee emp)
Remove a member from the project. |
void |
removeReviewer(Employee emp)
Remove a reviewer from the project. |
void |
setBudget(java.math.BigDecimal budget)
Set the project's budget. |
void |
setMembers(java.util.Set employees)
Set the members of the project. |
void |
setName(java.lang.String name)
Set the name of the project. |
void |
setReviewers(java.util.Set reviewers)
Set the reviewers associated with this project. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Project()
public Project(long projid, java.lang.String name, java.math.BigDecimal budget)
projid
- The project identifier.name
- The name of the project.budget
- The budget for the project.Method Detail |
public long getProjid()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name of the project.public java.math.BigDecimal getBudget()
public void setBudget(java.math.BigDecimal budget)
budget
- The project's budget.public java.util.Set getReviewers()
public void addReviewer(Employee emp)
emp
- The employee to add as a reviewer.public void removeReviewer(Employee emp)
emp
- The employee to remove as a reviewer of this project.public void setReviewers(java.util.Set reviewers)
reviewers
- The set of reviewers to associate with this project.public java.util.Set getMembers()
Employee
s.public void addMember(Employee emp)
emp
- The employee to add to the project.public void removeMember(Employee emp)
emp
- The employee to remove from the project.public void setMembers(java.util.Set employees)
employees
- The set of employees to be the members of this
project.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(Project other)
other
- The Project 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 |