|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.BaseOpenmrsObject org.openmrs.BaseOpenmrsData org.openmrs.PersonName
public class PersonName
A Person can have zero to n PersonName(s).
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from class org.openmrs.BaseOpenmrsData |
---|
creator |
Constructor Summary | |
---|---|
PersonName()
default constructor |
|
PersonName(java.lang.Integer personNameId)
constructor with id |
|
PersonName(java.lang.String givenName,
java.lang.String middleName,
java.lang.String familyName)
Convenience constructor with the basic requirements |
Method Summary | |
---|---|
int |
compareTo(PersonName other)
TODO: the behavior of this method needs to be controlled by some sort of global property because an implementation can define how they want their names to look (which fields to show/hide) |
boolean |
equals(java.lang.Object obj)
Compares two objects for similarity |
boolean |
equalsContent(PersonName otherName)
Compares this PersonName object to the given otherName. |
java.util.Date |
getDateVoided()
This still exists on PersonName for the SimpleFramework annotation |
java.lang.String |
getDegree()
|
java.lang.String |
getFamilyName()
|
java.lang.String |
getFamilyName2()
|
java.lang.String |
getFamilyNamePrefix()
|
java.lang.String |
getFamilyNameSuffix()
|
java.lang.String |
getFullName()
Convenience method to get all the names of this PersonName and concatonating them together with spaces in between. |
java.lang.String |
getGivenName()
|
java.lang.Integer |
getId()
|
java.lang.String |
getMiddleName()
|
Person |
getPerson()
|
java.lang.Integer |
getPersonNameId()
|
java.lang.Boolean |
getPreferred()
|
java.lang.String |
getPrefix()
|
java.lang.Boolean |
getVoided()
This method delegates to BaseOpenmrsData.isVoided() . |
User |
getVoidedBy()
This still exists on PersonName for the SimpleFramework annotation |
java.lang.String |
getVoidReason()
This still exists on PersonName for the SimpleFramework annotation |
int |
hashCode()
|
java.lang.Boolean |
isPreferred()
|
static PersonName |
newInstance(PersonName pn)
bitwise copy of the personName object. |
void |
setDateVoided(java.util.Date dateVoided)
|
void |
setDegree(java.lang.String degree)
|
void |
setFamilyName(java.lang.String familyName)
|
void |
setFamilyName2(java.lang.String familyName2)
|
void |
setFamilyNamePrefix(java.lang.String familyNamePrefix)
|
void |
setFamilyNameSuffix(java.lang.String familyNameSuffix)
|
void |
setGivenName(java.lang.String givenName)
|
void |
setId(java.lang.Integer id)
|
void |
setMiddleName(java.lang.String middleName)
|
void |
setPerson(Person person)
|
void |
setPersonNameId(java.lang.Integer personNameId)
|
void |
setPreferred(java.lang.Boolean preferred)
|
void |
setPrefix(java.lang.String prefix)
|
void |
setVoided(java.lang.Boolean voided)
This still exists on PersonName for the SimpleFramework annotation |
void |
setVoidedBy(User voidedBy)
This still exists on PersonName for the SimpleFramework annotation |
void |
setVoidReason(java.lang.String voidReason)
This still exists on PersonName for the SimpleFramework annotation |
java.lang.String |
toString()
|
Methods inherited from class org.openmrs.BaseOpenmrsData |
---|
getChangedBy, getCreator, getDateChanged, getDateCreated, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated |
Methods inherited from class org.openmrs.BaseOpenmrsObject |
---|
getUuid, setUuid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openmrs.OpenmrsObject |
---|
getUuid, setUuid |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public PersonName()
public PersonName(java.lang.Integer personNameId)
public PersonName(java.lang.String givenName, java.lang.String middleName, java.lang.String familyName)
givenName
- String this person's first namemiddleName
- String this person's middle namefamilyName
- String this person's last nameMethod Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- PersonName to compare to
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equalsContent(PersonName otherName)
equals(Object)
in that this method compares the inner fields of each name for
equality. Note: Null/empty fields on otherName
/will not/ cause a false value to
be returned
otherName
- PersonName with which to compare
public static PersonName newInstance(PersonName pn)
public java.util.Date getDateVoided()
getDateVoided
in interface Voidable
getDateVoided
in class BaseOpenmrsData
Voidable.getDateVoided()
public void setDateVoided(java.util.Date dateVoided)
setDateVoided
in interface Voidable
setDateVoided
in class BaseOpenmrsData
dateVoided
- The dateVoided to set.Voidable.setDateVoided(java.util.Date)
public java.lang.String getDegree()
public void setDegree(java.lang.String degree)
degree
- The degree to set.public java.lang.String getFamilyName()
public void setFamilyName(java.lang.String familyName)
familyName
- The familyName to set.public java.lang.String getFamilyName2()
public void setFamilyName2(java.lang.String familyName2)
familyName2
- The familyName2 to set.public java.lang.String getFamilyNamePrefix()
public void setFamilyNamePrefix(java.lang.String familyNamePrefix)
familyNamePrefix
- The familyNamePrefix to set.public java.lang.String getFamilyNameSuffix()
public void setFamilyNameSuffix(java.lang.String familyNameSuffix)
familyNameSuffix
- The familyNameSuffix to set.public java.lang.String getGivenName()
public void setGivenName(java.lang.String givenName)
givenName
- The givenName to set.public java.lang.String getMiddleName()
public void setMiddleName(java.lang.String middleName)
middleName
- The middleName to set.public Person getPerson()
public void setPerson(Person person)
person
- The person to set.public java.lang.Integer getPersonNameId()
public void setPersonNameId(java.lang.Integer personNameId)
personNameId
- The personNameId to set.public java.lang.Boolean isPreferred()
public java.lang.Boolean getPreferred()
public void setPreferred(java.lang.Boolean preferred)
preferred
- The preferred to set.public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- The prefix to set.public java.lang.Boolean getVoided()
BaseOpenmrsData
BaseOpenmrsData.isVoided()
. This is only needed for jstl syntax like
${person.voided} because the return type is a Boolean object instead of a boolean primitive
type.
getVoided
in class BaseOpenmrsData
BaseOpenmrsData.isVoided()
public void setVoided(java.lang.Boolean voided)
setVoided
in interface Voidable
setVoided
in class BaseOpenmrsData
voided
- The voided to set.Voidable.setVoided(java.lang.Boolean)
public User getVoidedBy()
getVoidedBy
in interface Voidable
getVoidedBy
in class BaseOpenmrsData
Voidable.getVoidedBy()
public void setVoidedBy(User voidedBy)
setVoidedBy
in interface Voidable
setVoidedBy
in class BaseOpenmrsData
voidedBy
- The voidedBy to set.Voidable.setVoidedBy(org.openmrs.User)
public java.lang.String getVoidReason()
getVoidReason
in interface Voidable
getVoidReason
in class BaseOpenmrsData
Voidable.getVoidReason()
public void setVoidReason(java.lang.String voidReason)
setVoidReason
in interface Voidable
setVoidReason
in class BaseOpenmrsData
voidReason
- The voidReason to set.Voidable.setVoidReason(java.lang.String)
public java.lang.String getFullName()
getPrefix()
,
getGivenName()
, getMiddleName()
, etc
are null, they are not included in the returned name
PersonName
joined with spacespublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int compareTo(PersonName other)
compareTo
in interface java.lang.Comparable<PersonName>
Comparable.compareTo(java.lang.Object)
public java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |