|
|||||||||||
| 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
This class represents a person.
| Nested Class Summary | |
static class |
Person.Oid
This class is used to represent the application identifier for the Person class. |
| Field Summary | |
protected static java.text.SimpleDateFormat |
formatter
|
| Constructor Summary | |
protected |
Person()
This is the JDO-required no-args constructor. |
|
Person(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate)
Construct a Person instance. |
|
Person(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate,
IAddress address)
Construct a Person instance. |
| Method Summary | |
static int |
compare(IPerson o1,
IPerson o2)
Compares its two IPerson arguments for order. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compare two instances. |
int |
compareTo(IPerson other)
Compares this object with the specified Person 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. |
IAddress |
getAddress()
Get the address. |
java.util.Date |
getBirthdate()
Get the person's birthdate. |
protected java.lang.String |
getFieldRepr()
Returns a String representation of the non-relationship fields. |
java.lang.String |
getFirstname()
Get the person's first name. |
java.lang.String |
getLastname()
Get the person's last name. |
java.lang.String |
getMiddlename()
Get the person's middle name. |
long |
getPersonid()
Get the person's id. |
java.lang.String |
getPhoneNumber(java.lang.String type)
Get the phone number for the specified phone number type. |
java.util.Map |
getPhoneNumbers()
Get the map of phone numbers as an unmodifiable map. |
int |
hashCode()
Returns a hash code value for the object. |
java.lang.String |
putPhoneNumber(java.lang.String type,
java.lang.String phoneNumber)
Associates the specified phone number with the specified type in the map of phone numbers of this person. |
java.lang.String |
removePhoneNumber(java.lang.String type)
Remove a phoneNumber from the map of phone numbers. |
void |
setAddress(IAddress address)
Set the address. |
void |
setBirthdate(java.util.Date birthdate)
Set the person's birthdate. |
void |
setFirstname(java.lang.String firstname)
Set the person's first name. |
void |
setLastname(long personid)
Set the person's id. |
void |
setLastname(java.lang.String lastname)
Set the person's last name. |
void |
setMiddlename(java.lang.String middlename)
Set the person's middle name. |
void |
setPersonid(long id)
Set the id associated with this object. |
void |
setPhoneNumbers(java.util.Map phoneNumbers)
Set the phoneNumber map to be in this person. |
java.lang.String |
toString()
Returns a String representation of a Person object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static java.text.SimpleDateFormat formatter
| Constructor Detail |
protected Person()
public Person(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate)
Person instance.
personid - The person identifier.firstname - The person's first name.lastname - The person's last name.middlename - The person's middle name.birthdate - The person's birthdate.
public Person(long personid,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String middlename,
java.util.Date birthdate,
IAddress address)
Person instance.
personid - The person identifier.firstname - The person's first name.lastname - The person's last name.middlename - The person's middle name.birthdate - The person's birthdate.address - The person's address.| Method Detail |
public void setPersonid(long id)
setPersonid in interface IPersonid - the id.public long getPersonid()
getPersonid in interface IPersonpublic void setLastname(long personid)
personid - The personid.public java.lang.String getLastname()
getLastname in interface IPersonpublic void setLastname(java.lang.String lastname)
setLastname in interface IPersonlastname - The last name.public java.lang.String getFirstname()
getFirstname in interface IPersonpublic void setFirstname(java.lang.String firstname)
setFirstname in interface IPersonfirstname - The first name.public java.lang.String getMiddlename()
getMiddlename in interface IPersonpublic void setMiddlename(java.lang.String middlename)
setMiddlename in interface IPersonmiddlename - The middle name.public IAddress getAddress()
getAddress in interface IPersonpublic void setAddress(IAddress address)
setAddress in interface IPersonaddress - The address.public java.util.Date getBirthdate()
getBirthdate in interface IPersonpublic void setBirthdate(java.util.Date birthdate)
setBirthdate in interface IPersonbirthdate - The person's birthdate.public java.util.Map getPhoneNumbers()
getPhoneNumbers in interface IPersonpublic java.lang.String getPhoneNumber(java.lang.String type)
type - The phone number type ("home", "work", "mobile", etc.).
null if there was no phone number for the type.
public java.lang.String putPhoneNumber(java.lang.String type,
java.lang.String phoneNumber)
type - The phone number type ("home", "work", "mobile", etc.).phoneNumber - The phone number
null if there was no phone number for the type.public java.lang.String removePhoneNumber(java.lang.String type)
type - The phone number type ("home", "work", "mobile", etc.).
null if there was no phone number for the type.public void setPhoneNumbers(java.util.Map phoneNumbers)
setPhoneNumbers in interface IPersonphoneNumbers - The map of phoneNumbers for this person.public java.lang.String toString()
Person object.
Person 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 DeepEqualityother - 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.Comparableo - 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.Comparatorpublic int compareTo(IPerson other)
other - The Person object to be compared.
public static int compare(IPerson o1,
IPerson o2)
o1 - the first IPerson object to be compared.o2 - the second IPerson object to be compared.
public boolean equals(java.lang.Object obj)
equals in interface java.util.Comparatorobj - 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 | ||||||||||