public class PersonName extends BaseOpenmrsData implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PersonName>
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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 |
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
|
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()
Returns a string consisting of the name of the class of which the object is an instance and
the
uuid field surrounded by [ and ] . |
getChangedBy, getCreator, getDateChanged, getDateCreated, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
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 namepublic boolean equalsContent(PersonName otherName)
BaseOpenmrsObject.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 returnedotherName
- PersonName with which to comparepublic 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 namePersonName
joined with spacespublic java.lang.String toString()
BaseOpenmrsObject
uuid
field surrounded by [
and ]
. In other words,
this method returns a string equal to the value of: getClass().getName() + '[' + uuid + ']'
If the uuid
field is null
, it delegates to
Object.toString()
toString
in class BaseOpenmrsObject
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)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.