|
|||||||||||
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 | |
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. |
static int |
compare(IProject o1,
IProject o2)
Compares its two IProject arguments for order. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compare two instances. |
int |
compareTo(IProject other)
Compares this object with the specified Project object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
deepCompareFields(java.lang.Object 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. |
protected java.lang.String |
getFieldRepr()
Returns a String representation of the non-relationship fields. |
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 |
setProjid(long id)
Set the id associated with this object. |
void |
setReviewers(java.util.Set reviewers)
Set the reviewers associated with this project. |
java.lang.String |
toString()
Returns a String representation of a Project object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public 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 void setProjid(long id)
setProjid
in interface IProject
id
- the id.public long getProjid()
getProjid
in interface IProject
public java.lang.String getName()
getName
in interface IProject
public void setName(java.lang.String name)
setName
in interface IProject
name
- The name of the project.public java.math.BigDecimal getBudget()
getBudget
in interface IProject
public void setBudget(java.math.BigDecimal budget)
setBudget
in interface IProject
budget
- The project's budget.public java.util.Set getReviewers()
getReviewers
in interface IProject
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)
setReviewers
in interface IProject
reviewers
- The set of reviewers to associate with this project.public java.util.Set getMembers()
getMembers
in interface IProject
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)
setMembers
in interface IProject
employees
- The set of employees to be the members of this
project.public java.lang.String toString()
Project
object.
Project
object.protected java.lang.String getFieldRepr()
public boolean deepCompareFields(java.lang.Object 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 compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
public int compareTo(IProject other)
other
- The Project object to be compared.
public static int compare(IProject o1, IProject o2)
o1
- the first IProject object to be compared.o2
- the second IProject object to be compared.
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Comparator
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 |