|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.tck.pc.company.Company
This class represents information about a company.
Nested Class Summary | |
static class |
Company.Oid
The class to be used as the application identifier for the Company class. |
Constructor Summary | |
protected |
Company()
This is the JDO-required no-args constructor |
|
Company(long companyid,
java.lang.String name,
java.util.Date founded,
Address addr)
Initialize the Company instance. |
Method Summary | |
void |
addDepartment(Department dept)
Add a Department instance to the company. |
int |
compareTo(Company other)
Compares this object with the specified Company 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. |
Address |
getAddress()
Get the address of the company. |
long |
getCompanyid()
Get the company id. |
java.util.Set |
getDepartments()
Get the departments contained in the company. |
java.util.Date |
getFounded()
Get the date that the company was founded. |
java.lang.String |
getName()
Get the name of the company. |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeDepartment(Department dept)
Remove a Department instance from the company. |
void |
setAddress(Address address)
Set the primary address for the company. |
void |
setDepartments(java.util.Set departments)
Initialize the set of Department s in the company to the
parameter. |
void |
setFounded(java.util.Date founded)
Set the date that the company was founded. |
void |
setName(java.lang.String name)
Set the name of the company. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Company()
public Company(long companyid, java.lang.String name, java.util.Date founded, Address addr)
Company
instance.
companyid
- The company id.name
- The company name.founded
- The date the company was founded.addr
- The company's address.Method Detail |
public long getCompanyid()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The value to use for the name of the company.public java.util.Date getFounded()
public void setFounded(java.util.Date founded)
founded
- The date to set that the company was founded.public Address getAddress()
public void setAddress(Address address)
address
- The address to set for the company.public java.util.Set getDepartments()
Set
that contains all the
Department
s of the company.public void addDepartment(Department dept)
Department
instance to the company.
dept
- The Department
instance to add.public void removeDepartment(Department dept)
Department
instance from the company.
dept
- The Department
instance to remove.public void setDepartments(java.util.Set departments)
Department
s in the company to the
parameter.
departments
- The set of Department
s for the
company.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(Company other)
other
- The Company 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 |