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, setDateCreated
getUuid, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public PersonName()
public PersonName(Integer personNameId)
public boolean equals(Object obj)
equals
in class Object
obj
- PersonName to compare toObject.equals(java.lang.Object)
public int hashCode()
hashCode
in class 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 returnedotherName
- PersonName with which to comparepublic static PersonName newInstance(PersonName pn)
public Date getDateVoided()
getDateVoided
in interface Voidable
getDateVoided
in class BaseOpenmrsData
Voidable.getDateVoided()
public void setDateVoided(Date dateVoided)
setDateVoided
in interface Voidable
setDateVoided
in class BaseOpenmrsData
dateVoided
- 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()
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(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 String getVoidReason()
getVoidReason
in interface Voidable
getVoidReason
in class BaseOpenmrsData
Voidable.getVoidReason()
public void setVoidReason(String voidReason)
setVoidReason
in interface Voidable
setVoidReason
in class BaseOpenmrsData
voidReason
- 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 Object
Object.toString()
public int compareTo(PersonName other)
compareTo
in interface Comparable<PersonName>
Comparable.compareTo(java.lang.Object)
public Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.