public class PersonAttribute extends BaseOpenmrsData implements java.io.Serializable, java.lang.Comparable<PersonAttribute>
PersonAttributeType,
Attributable,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
creator| Constructor and Description |
|---|
PersonAttribute()
default constructor
|
PersonAttribute(java.lang.Integer personAttributeId) |
PersonAttribute(PersonAttributeType type,
java.lang.String value)
Constructor for creating a basic attribute
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PersonAttribute other) |
PersonAttribute |
copy()
Shallow copy of this PersonAttribute.
|
protected PersonAttribute |
copyHelper(PersonAttribute target)
The purpose of this method is to allow subclasses of PersonAttribute to delegate a portion of
their copy() method back to the superclass, in case the base class implementation changes.
|
boolean |
equalsContent(PersonAttribute otherAttribute)
Compares this PersonAttribute object to the given otherAttribute.
|
PersonAttributeType |
getAttributeType() |
java.lang.Object |
getHydratedObject()
Will try to create an object of class 'PersonAttributeType.format'.
|
java.lang.Integer |
getId() |
Person |
getPerson() |
java.lang.Integer |
getPersonAttributeId() |
java.lang.String |
getValue() |
void |
setAttributeType(PersonAttributeType attributeType) |
void |
setId(java.lang.Integer id) |
void |
setPerson(Person person) |
void |
setPersonAttributeId(java.lang.Integer personAttributeId) |
void |
setValue(java.lang.String value) |
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 ]. |
void |
voidAttribute(java.lang.String reason)
Convenience method for voiding this attribute
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReasonequals, getUuid, hashCode, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic static final long serialVersionUID
public PersonAttribute()
public PersonAttribute(java.lang.Integer personAttributeId)
public PersonAttribute(PersonAttributeType type, java.lang.String value)
type - PersonAttributeTypevalue - Stringpublic PersonAttribute copy()
thisprotected PersonAttribute copyHelper(PersonAttribute target)
target - a PersonAttribute that will have the state of this copied into itpublic boolean equalsContent(PersonAttribute otherAttribute)
BaseOpenmrsObject.equals(Object) in that this method compares the inner fields of each attribute for
equality. Note: Null/empty fields on otherAttribute /will not/ cause a false
value to be returnedotherAttribute - PersonAttribute with which to comparepublic Person getPerson()
public void setPerson(Person person)
person - The person to set.public PersonAttributeType getAttributeType()
public void setAttributeType(PersonAttributeType attributeType)
attributeType - the attributeType to setpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - the value to setpublic java.lang.String toString()
BaseOpenmrsObjectuuid 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 BaseOpenmrsObjectObject.toString()public java.lang.Integer getPersonAttributeId()
public void setPersonAttributeId(java.lang.Integer personAttributeId)
personAttributeId - the personAttributeId to setpublic java.lang.Object getHydratedObject()
Attributable, hydrate(value) is called. Defaults to just returning getValue()public void voidAttribute(java.lang.String reason)
reason - public int compareTo(PersonAttribute other)
compareTo in interface java.lang.Comparable<PersonAttribute>Comparable.compareTo(java.lang.Object)public java.lang.Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(java.lang.Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)Copyright © 2018 OpenMRS Inc.. All Rights Reserved.