public class PersonName extends BaseOpenmrsData implements Serializable, Cloneable, Comparable<PersonName>
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
creator| Constructor and Description |
|---|
PersonName()
default constructor
|
PersonName(Integer personNameId)
constructor with id
|
PersonName(String givenName,
String middleName,
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 |
equals(Object obj)
Compares two objects for similarity
|
boolean |
equalsContent(PersonName otherName)
Compares this PersonName object to the given otherName.
|
Date |
getDateVoided()
This still exists on PersonName for the SimpleFramework annotation
|
String |
getDegree() |
String |
getFamilyName() |
String |
getFamilyName2() |
String |
getFamilyNamePrefix() |
String |
getFamilyNameSuffix() |
String |
getFullName()
Convenience method to get all the names of this
PersonName and concatonating them together with
spaces in between.
|
String |
getGivenName() |
Integer |
getId() |
String |
getMiddleName() |
Person |
getPerson() |
Integer |
getPersonNameId() |
Boolean |
getPreferred() |
String |
getPrefix() |
Boolean |
getVoided()
This method delegates to
BaseOpenmrsData.isVoided(). |
User |
getVoidedBy()
This still exists on PersonName for the SimpleFramework annotation
|
String |
getVoidReason()
This still exists on PersonName for the SimpleFramework annotation
|
int |
hashCode() |
Boolean |
isPreferred() |
static PersonName |
newInstance(PersonName pn)
bitwise copy of the personName object.
|
void |
setDateVoided(Date dateVoided) |
void |
setDegree(String degree) |
void |
setFamilyName(String familyName) |
void |
setFamilyName2(String familyName2) |
void |
setFamilyNamePrefix(String familyNamePrefix) |
void |
setFamilyNameSuffix(String familyNameSuffix) |
void |
setGivenName(String givenName) |
void |
setId(Integer id) |
void |
setMiddleName(String middleName) |
void |
setPerson(Person person) |
void |
setPersonNameId(Integer personNameId) |
void |
setPreferred(Boolean preferred) |
void |
setPrefix(String prefix) |
void |
setVoided(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(String voidReason)
This still exists on PersonName for the SimpleFramework annotation
|
String |
toString() |
getChangedBy, getCreator, getDateChanged, getDateCreated, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreatedgetUuid, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic static final long serialVersionUID
public PersonName()
public PersonName(Integer personNameId)
public boolean equals(Object obj)
equals in class Objectobj - PersonName to compare toObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.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 returnedotherName - PersonName with which to comparepublic static PersonName newInstance(PersonName pn)
public Date getDateVoided()
getDateVoided in interface VoidablegetDateVoided in class BaseOpenmrsDataVoidable.getDateVoided()public void setDateVoided(Date dateVoided)
setDateVoided in interface VoidablesetDateVoided in class BaseOpenmrsDatadateVoided - The dateVoided to set.Voidable.setDateVoided(java.util.Date)public String getDegree()
public void setDegree(String degree)
degree - The degree to set.public String getFamilyName()
public void setFamilyName(String familyName)
familyName - The familyName to set.public String getFamilyName2()
public void setFamilyName2(String familyName2)
familyName2 - The familyName2 to set.public String getFamilyNamePrefix()
public void setFamilyNamePrefix(String familyNamePrefix)
familyNamePrefix - The familyNamePrefix to set.public String getFamilyNameSuffix()
public void setFamilyNameSuffix(String familyNameSuffix)
familyNameSuffix - The familyNameSuffix to set.public String getGivenName()
public void setGivenName(String givenName)
givenName - The givenName to set.public String getMiddleName()
public void setMiddleName(String middleName)
middleName - The middleName to set.public Person getPerson()
public void setPerson(Person person)
person - The person to set.public Integer getPersonNameId()
public void setPersonNameId(Integer personNameId)
personNameId - The personNameId to set.public Boolean isPreferred()
public Boolean getPreferred()
public void setPreferred(Boolean preferred)
preferred - The preferred to set.public String getPrefix()
public void setPrefix(String prefix)
prefix - The prefix to set.public Boolean getVoided()
BaseOpenmrsDataBaseOpenmrsData.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 BaseOpenmrsDataBaseOpenmrsData.isVoided()public void setVoided(Boolean voided)
setVoided in interface VoidablesetVoided in class BaseOpenmrsDatavoided - The voided to set.Voidable.setVoided(java.lang.Boolean)public User getVoidedBy()
getVoidedBy in interface VoidablegetVoidedBy in class BaseOpenmrsDataVoidable.getVoidedBy()public void setVoidedBy(User voidedBy)
setVoidedBy in interface VoidablesetVoidedBy in class BaseOpenmrsDatavoidedBy - The voidedBy to set.Voidable.setVoidedBy(org.openmrs.User)public String getVoidReason()
getVoidReason in interface VoidablegetVoidReason in class BaseOpenmrsDataVoidable.getVoidReason()public void setVoidReason(String voidReason)
setVoidReason in interface VoidablesetVoidReason in class BaseOpenmrsDatavoidReason - The voidReason to set.Voidable.setVoidReason(java.lang.String)public String getFullName()
getPrefix(),
getGivenName(), getMiddleName(), etc
are null, they are not included in the returned namePersonName joined with spacespublic String toString()
toString in class ObjectObject.toString()public int compareTo(PersonName other)
compareTo in interface Comparable<PersonName>Comparable.compareTo(java.lang.Object)public Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.