@Entity public class PersonAddress extends BaseChangeableOpenmrsData implements Serializable, Cloneable, Comparable<PersonAddress>, Address
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
creator| Constructor and Description |
|---|
PersonAddress()
default constructor
|
PersonAddress(Integer personAddressId)
constructor with id
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Makes an address active by setting its endDate to null
|
Object |
clone()
bitwise copy of the personAddress object.
|
int |
compareTo(PersonAddress other) |
void |
deactivate()
Makes an address inactive by setting its endDate to the current time
|
boolean |
equalsContent(PersonAddress otherAddress)
Compares this PersonAddress object to the given otherAddress.
|
String |
getAddress1() |
String |
getAddress10() |
String |
getAddress11() |
String |
getAddress12() |
String |
getAddress13() |
String |
getAddress14() |
String |
getAddress15() |
String |
getAddress2() |
String |
getAddress3() |
String |
getAddress4() |
String |
getAddress5() |
String |
getAddress6() |
String |
getAddress7() |
String |
getAddress8() |
String |
getAddress9() |
String |
getCityVillage() |
String |
getCountry() |
String |
getCountyDistrict() |
Date |
getEndDate() |
Integer |
getId() |
String |
getLatitude() |
String |
getLongitude() |
Person |
getPerson() |
Integer |
getPersonAddressId() |
String |
getPostalCode() |
Boolean |
getPreferred() |
Date |
getStartDate() |
String |
getStateProvince() |
Boolean |
isActive()
Returns true if the address' endDate is null
|
boolean |
isBlank()
Convenience method to test whether any of the fields in this address are set
|
Boolean |
isPreferred()
Deprecated.
as of 2.0, use
getPreferred() |
void |
setAddress1(String address1) |
void |
setAddress10(String address10) |
void |
setAddress11(String address11) |
void |
setAddress12(String address12) |
void |
setAddress13(String address13) |
void |
setAddress14(String address14) |
void |
setAddress15(String address15) |
void |
setAddress2(String address2) |
void |
setAddress3(String address3) |
void |
setAddress4(String address4) |
void |
setAddress5(String address5) |
void |
setAddress6(String address6) |
void |
setAddress7(String address7) |
void |
setAddress8(String address8) |
void |
setAddress9(String address9) |
void |
setCityVillage(String cityVillage) |
void |
setCountry(String country) |
void |
setCountyDistrict(String countyDistrict) |
void |
setEndDate(Date endDate) |
void |
setId(Integer id) |
void |
setLatitude(String latitude) |
void |
setLongitude(String longitude) |
void |
setPerson(Person person) |
void |
setPersonAddressId(Integer personAddressId) |
void |
setPostalCode(String postalCode) |
void |
setPreferred(Boolean preferred) |
void |
setStartDate(Date startDate) |
void |
setStateProvince(String stateProvince) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReasonequals, getUuid, hashCode, setUuidfinalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic static final long serialVersionUID
public PersonAddress()
public PersonAddress(Integer personAddressId)
public String toString()
BaseOpenmrsObjectClassName{hashCode=..., uuid=...}
If the uuid field is null, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString in class BaseOpenmrsObjectObject.toString()public boolean equalsContent(PersonAddress otherAddress)
BaseOpenmrsObject.equals(Object) in that this method compares the inner fields of each address for
equality. Note: Null/empty fields on otherAddress /will not/ cause a false value
to be returnedotherAddress - PersonAddress with which to comparepublic Object clone()
public String getAddress1()
getAddress1 in interface Addresspublic void setAddress1(String address1)
setAddress1 in interface Addressaddress1 - The address1 to set.public String getAddress2()
getAddress2 in interface Addresspublic void setAddress2(String address2)
setAddress2 in interface Addressaddress2 - The address2 to set.public String getCityVillage()
getCityVillage in interface Addresspublic void setCityVillage(String cityVillage)
setCityVillage in interface AddresscityVillage - The cityVillage to set.public String getCountry()
getCountry in interface Addresspublic void setCountry(String country)
setCountry in interface Addresscountry - The country to set.@Deprecated public Boolean isPreferred()
getPreferred()public Boolean getPreferred()
public void setPreferred(Boolean preferred)
preferred - The preferred to set.public String getLatitude()
getLatitude in interface Addresspublic void setLatitude(String latitude)
setLatitude in interface Addresslatitude - The latitude to set.public String getLongitude()
getLongitude in interface Addresspublic void setLongitude(String longitude)
setLongitude in interface Addresslongitude - The longitude to set.public Person getPerson()
public void setPerson(Person person)
person - The person to set.public Integer getPersonAddressId()
public void setPersonAddressId(Integer personAddressId)
personAddressId - The personAddressId to set.public String getPostalCode()
getPostalCode in interface Addresspublic void setPostalCode(String postalCode)
setPostalCode in interface AddresspostalCode - The postalCode to set.public String getStateProvince()
getStateProvince in interface Addresspublic void setStateProvince(String stateProvince)
setStateProvince in interface AddressstateProvince - The stateProvince to set.public String getCountyDistrict()
getCountyDistrict in interface Addresspublic void setCountyDistrict(String countyDistrict)
setCountyDistrict in interface AddresscountyDistrict - The countyDistrict to set.public boolean isBlank()
public int compareTo(PersonAddress other)
compareTo in interface Comparable<PersonAddress>Note: this comparator imposes orderings that are inconsistent with equals.public String getAddress3()
getAddress3 in interface Addresspublic void setAddress3(String address3)
setAddress3 in interface Addressaddress3 - the address3 to setpublic String getAddress4()
getAddress4 in interface Addresspublic void setAddress4(String address4)
setAddress4 in interface Addressaddress4 - the address4 to setpublic String getAddress6()
getAddress6 in interface Addresspublic void setAddress6(String address6)
setAddress6 in interface Addressaddress6 - the address6 to setpublic String getAddress5()
getAddress5 in interface Addresspublic void setAddress5(String address5)
setAddress5 in interface Addressaddress5 - the address5 to setpublic 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)public Date getStartDate()
public void setStartDate(Date startDate)
startDate - to set topublic Date getEndDate()
public void setEndDate(Date endDate)
endDate - to set topublic Boolean isActive()
public void deactivate()
public void activate()
public String getAddress7()
getAddress7 in interface Addresspublic void setAddress7(String address7)
setAddress7 in interface Addresspublic String getAddress8()
getAddress8 in interface Addresspublic void setAddress8(String address8)
setAddress8 in interface Addresspublic String getAddress9()
getAddress9 in interface Addresspublic void setAddress9(String address9)
setAddress9 in interface Addresspublic String getAddress10()
getAddress10 in interface Addresspublic void setAddress10(String address10)
setAddress10 in interface Addresspublic String getAddress11()
getAddress11 in interface Addresspublic void setAddress11(String address11)
setAddress11 in interface Addresspublic String getAddress12()
getAddress12 in interface Addresspublic void setAddress12(String address12)
setAddress12 in interface Addresspublic String getAddress13()
getAddress13 in interface Addresspublic void setAddress13(String address13)
setAddress13 in interface Addresspublic String getAddress14()
getAddress14 in interface Addresspublic void setAddress14(String address14)
setAddress14 in interface Addresspublic String getAddress15()
getAddress15 in interface Addresspublic void setAddress15(String address15)
setAddress15 in interface AddressCopyright © 2024 OpenMRS Inc.. All rights reserved.