public class PersonAddress extends BaseOpenmrsData implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PersonAddress>, Address
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
PersonAddress()
default constructor
|
PersonAddress(java.lang.Integer personAddressId)
constructor with id
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Makes an address active by setting its endDate to null
|
java.lang.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.
|
java.lang.String |
getAddress1() |
java.lang.String |
getAddress2() |
java.lang.String |
getAddress3() |
java.lang.String |
getAddress4() |
java.lang.String |
getAddress5() |
java.lang.String |
getAddress6() |
java.lang.String |
getCityVillage() |
java.lang.String |
getCountry() |
java.lang.String |
getCountyDistrict() |
java.util.Date |
getEndDate() |
java.lang.Integer |
getId() |
java.lang.String |
getLatitude() |
java.lang.String |
getLongitude() |
java.lang.String |
getNeighborhoodCell()
Deprecated.
As of 1.8, replaced by
getAddress3() |
Person |
getPerson() |
java.lang.Integer |
getPersonAddressId() |
java.lang.String |
getPostalCode() |
java.lang.Boolean |
getPreferred() |
java.lang.String |
getRegion()
Deprecated.
As of 1.8, replaced by
getAddress6() |
java.util.Date |
getStartDate() |
java.lang.String |
getStateProvince() |
java.lang.String |
getSubregion()
Deprecated.
As of 1.8, replaced by
getAddress5() |
java.lang.String |
getTownshipDivision()
Deprecated.
As of 1.8, replaced by
getAddress4() |
java.lang.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
|
java.lang.Boolean |
isPreferred() |
void |
setAddress1(java.lang.String address1) |
void |
setAddress2(java.lang.String address2) |
void |
setAddress3(java.lang.String address3) |
void |
setAddress4(java.lang.String address4) |
void |
setAddress5(java.lang.String address5) |
void |
setAddress6(java.lang.String address6) |
void |
setCityVillage(java.lang.String cityVillage) |
void |
setCountry(java.lang.String country) |
void |
setCountyDistrict(java.lang.String countyDistrict) |
void |
setEndDate(java.util.Date endDate) |
void |
setId(java.lang.Integer id) |
void |
setLatitude(java.lang.String latitude) |
void |
setLongitude(java.lang.String longitude) |
void |
setNeighborhoodCell(java.lang.String address3)
Deprecated.
As of 1.8, replaced by
setAddress3(String) |
void |
setPerson(Person person) |
void |
setPersonAddressId(java.lang.Integer personAddressId) |
void |
setPostalCode(java.lang.String postalCode) |
void |
setPreferred(java.lang.Boolean preferred) |
void |
setRegion(java.lang.String address6)
Deprecated.
As of 1.8, replaced by
setAddress6(String) |
void |
setStartDate(java.util.Date startDate) |
void |
setStateProvince(java.lang.String stateProvince) |
void |
setSubregion(java.lang.String address5)
Deprecated.
As of 1.8, replaced by
setAddress5(String) |
void |
setTownshipDivision(java.lang.String address4)
Deprecated.
As of 1.8, replaced by
setAddress4(String) |
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 ] . |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public PersonAddress()
public PersonAddress(java.lang.Integer personAddressId)
public java.lang.String toString()
BaseOpenmrsObject
uuid
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 BaseOpenmrsObject
Object.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 java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getAddress1()
getAddress1
in interface Address
public void setAddress1(java.lang.String address1)
setAddress1
in interface Address
address1
- The address1 to set.public java.lang.String getAddress2()
getAddress2
in interface Address
public void setAddress2(java.lang.String address2)
setAddress2
in interface Address
address2
- The address2 to set.public java.lang.String getCityVillage()
getCityVillage
in interface Address
public void setCityVillage(java.lang.String cityVillage)
setCityVillage
in interface Address
cityVillage
- The cityVillage to set.public java.lang.String getCountry()
getCountry
in interface Address
public void setCountry(java.lang.String country)
setCountry
in interface Address
country
- The country to set.public java.lang.Boolean isPreferred()
public java.lang.Boolean getPreferred()
public void setPreferred(java.lang.Boolean preferred)
preferred
- The preferred to set.public java.lang.String getLatitude()
getLatitude
in interface Address
public void setLatitude(java.lang.String latitude)
setLatitude
in interface Address
latitude
- The latitude to set.public java.lang.String getLongitude()
getLongitude
in interface Address
public void setLongitude(java.lang.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 java.lang.Integer getPersonAddressId()
public void setPersonAddressId(java.lang.Integer personAddressId)
personAddressId
- The personAddressId to set.public java.lang.String getPostalCode()
getPostalCode
in interface Address
public void setPostalCode(java.lang.String postalCode)
setPostalCode
in interface Address
postalCode
- The postalCode to set.public java.lang.String getStateProvince()
getStateProvince
in interface Address
public void setStateProvince(java.lang.String stateProvince)
setStateProvince
in interface Address
stateProvince
- The stateProvince to set.public java.lang.String getCountyDistrict()
getCountyDistrict
in interface Address
public void setCountyDistrict(java.lang.String countyDistrict)
setCountyDistrict
in interface Address
countyDistrict
- The countyDistrict to set.@Deprecated public java.lang.String getNeighborhoodCell()
getAddress3()
@Deprecated public void setNeighborhoodCell(java.lang.String address3)
setAddress3(String)
address3
- The neighborhoodCell to set.public boolean isBlank()
@Deprecated public java.lang.String getRegion()
getAddress6()
@Deprecated public void setRegion(java.lang.String address6)
setAddress6(String)
address6
- the region to set@Deprecated public java.lang.String getSubregion()
getAddress5()
@Deprecated public void setSubregion(java.lang.String address5)
setAddress5(String)
address5
- the subregion to set@Deprecated public java.lang.String getTownshipDivision()
getAddress4()
@Deprecated public void setTownshipDivision(java.lang.String address4)
setAddress4(String)
address4
- the address4 to setpublic int compareTo(PersonAddress other)
compareTo
in interface java.lang.Comparable<PersonAddress>
Comparable.compareTo(java.lang.Object)
public java.lang.String getAddress3()
getAddress3
in interface Address
public void setAddress3(java.lang.String address3)
setAddress3
in interface Address
address3
- the address3 to setpublic java.lang.String getAddress4()
getAddress4
in interface Address
public void setAddress4(java.lang.String address4)
setAddress4
in interface Address
address4
- the address4 to setpublic java.lang.String getAddress6()
getAddress6
in interface Address
public void setAddress6(java.lang.String address6)
setAddress6
in interface Address
address6
- the address6 to setpublic java.lang.String getAddress5()
getAddress5
in interface Address
public void setAddress5(java.lang.String address5)
setAddress5
in interface Address
address5
- the address5 to setpublic java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
startDate
- to set topublic java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
endDate
- to set topublic java.lang.Boolean isActive()
public void deactivate()
public void activate()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.