public class PersonAddress extends BaseOpenmrsData 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 |
---|---|
Object |
clone()
bitwise copy of the personAddress object.
|
int |
compareTo(PersonAddress other) |
boolean |
equals(Object obj)
Compares this address to the given object/address for similarity.
|
boolean |
equalsContent(PersonAddress otherAddress)
Compares this PersonAddress object to the given otherAddress.
|
String |
getAddress1() |
String |
getAddress2() |
String |
getAddress3() |
String |
getAddress4() |
String |
getAddress5() |
String |
getAddress6() |
String |
getCityVillage() |
String |
getCountry() |
String |
getCountyDistrict() |
Integer |
getId() |
String |
getLatitude() |
String |
getLongitude() |
String |
getNeighborhoodCell()
Deprecated.
As of 1.8, replaced by
getAddress3() |
Person |
getPerson() |
Integer |
getPersonAddressId() |
String |
getPostalCode() |
Boolean |
getPreferred() |
String |
getRegion()
Deprecated.
As of 1.8, replaced by
getAddress6() |
String |
getStateProvince() |
String |
getSubregion()
Deprecated.
As of 1.8, replaced by
getAddress5() |
String |
getTownshipDivision()
Deprecated.
As of 1.8, replaced by
getAddress4() |
int |
hashCode() |
boolean |
isBlank()
Convenience method to test whether any of the fields in this address are set
|
Boolean |
isPreferred() |
void |
setAddress1(String address1) |
void |
setAddress2(String address2) |
void |
setAddress3(String address3) |
void |
setAddress4(String address4) |
void |
setAddress5(String address5) |
void |
setAddress6(String address6) |
void |
setCityVillage(String cityVillage) |
void |
setCountry(String country) |
void |
setCountyDistrict(String countyDistrict) |
void |
setId(Integer id) |
void |
setLatitude(String latitude) |
void |
setLongitude(String longitude) |
void |
setNeighborhoodCell(String address3)
Deprecated.
As of 1.8, replaced by
setAddress3(String) |
void |
setPerson(Person person) |
void |
setPersonAddressId(Integer personAddressId) |
void |
setPostalCode(String postalCode) |
void |
setPreferred(Boolean preferred) |
void |
setRegion(String address6)
Deprecated.
As of 1.8, replaced by
setAddress6(String) |
void |
setStateProvince(String stateProvince) |
void |
setSubregion(String address5)
Deprecated.
As of 1.8, replaced by
setAddress5(String) |
void |
setTownshipDivision(String address4)
Deprecated.
As of 1.8, replaced by
setAddress4(String) |
String |
toString() |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
getUuid, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public PersonAddress()
public PersonAddress(Integer personAddressId)
public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in class Object
obj
- Object (Usually PersonAddress) with which to compareObject.equals(java.lang.Object)
public boolean equalsContent(PersonAddress otherAddress)
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 int hashCode()
hashCode
in class Object
Object.hashCode()
public Object clone()
public String getAddress1()
getAddress1
in interface Address
public void setAddress1(String address1)
setAddress1
in interface Address
address1
- The address1 to set.public String getAddress2()
getAddress2
in interface Address
public void setAddress2(String address2)
setAddress2
in interface Address
address2
- The address2 to set.public String getCityVillage()
getCityVillage
in interface Address
public void setCityVillage(String cityVillage)
setCityVillage
in interface Address
cityVillage
- The cityVillage to set.public String getCountry()
getCountry
in interface Address
public void setCountry(String country)
setCountry
in interface Address
country
- The country to set.public Boolean isPreferred()
public Boolean getPreferred()
public void setPreferred(Boolean preferred)
preferred
- The preferred to set.public String getLatitude()
getLatitude
in interface Address
public void setLatitude(String latitude)
setLatitude
in interface Address
latitude
- The latitude to set.public String getLongitude()
getLongitude
in interface Address
public void setLongitude(String longitude)
setLongitude
in interface Address
longitude
- 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 Address
public void setPostalCode(String postalCode)
setPostalCode
in interface Address
postalCode
- The postalCode to set.public String getStateProvince()
getStateProvince
in interface Address
public void setStateProvince(String stateProvince)
setStateProvince
in interface Address
stateProvince
- The stateProvince to set.public String getCountyDistrict()
getCountyDistrict
in interface Address
public void setCountyDistrict(String countyDistrict)
setCountyDistrict
in interface Address
countyDistrict
- The countyDistrict to set.@Deprecated public String getNeighborhoodCell()
getAddress3()
@Deprecated public void setNeighborhoodCell(String address3)
setAddress3(String)
address3
- The neighborhoodCell to set.public boolean isBlank()
@Deprecated public String getRegion()
getAddress6()
@Deprecated public void setRegion(String address6)
setAddress6(String)
address6
- the region to set@Deprecated public String getSubregion()
getAddress5()
@Deprecated public void setSubregion(String address5)
setAddress5(String)
address5
- the subregion to set@Deprecated public String getTownshipDivision()
getAddress4()
@Deprecated public void setTownshipDivision(String address4)
setAddress4(String)
address4
- the address4 to setpublic int compareTo(PersonAddress other)
compareTo
in interface Comparable<PersonAddress>
Comparable.compareTo(java.lang.Object)
public String getAddress3()
getAddress3
in interface Address
public void setAddress3(String address3)
setAddress3
in interface Address
address3
- the address3 to setpublic String getAddress4()
getAddress4
in interface Address
public void setAddress4(String address4)
setAddress4
in interface Address
address4
- the address4 to setpublic String getAddress6()
getAddress6
in interface Address
public void setAddress6(String address6)
setAddress6
in interface Address
address6
- the address6 to setpublic String getAddress5()
getAddress5
in interface Address
public void setAddress5(String address5)
setAddress5
in interface Address
address5
- the address5 to setpublic 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.