|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.BaseOpenmrsObject org.openmrs.BaseOpenmrsMetadata org.openmrs.Location
public class Location
A Location is a physical place, such as a hospital, a room, a clinic, or a district.
Locations support a single hierarchy, such that each location may have one parent location.
A non-geographical grouping of locations, such as "All Community Health Centers" is not a location, and
should be modeled using LocationTag
s.
Field Summary | |
---|---|
static int |
LOCATION_UNKNOWN
|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
Location()
default constructor |
|
Location(java.lang.Integer locationId)
constructor with id |
Method Summary | |
---|---|
void |
addChildLocation(Location child)
|
void |
addTag(LocationTag tag)
Attaches a tag to the Location. |
boolean |
equals(java.lang.Object obj)
Compares two objects for similarity |
java.util.List<Location> |
findPossibleValues(java.lang.String searchText)
Search for possible values of this object using the given search string |
java.lang.String |
getAddress1()
|
java.lang.String |
getAddress2()
|
java.lang.String |
getAddress3()
Added for compatibility reasons with 1.8+ |
java.lang.String |
getAddress4()
Added for compatibility reasons with 1.8+ |
java.lang.String |
getAddress5()
Added for compatibility reasons with 1.8+ |
java.lang.String |
getAddress6()
Added for compatibility reasons with 1.8+ |
java.util.Set<Location> |
getChildLocations()
|
java.util.Set<Location> |
getChildLocations(boolean includeRetired)
Returns all childLocations where child.locationId = this.locationId. |
java.lang.String |
getCityVillage()
|
java.lang.String |
getCountry()
|
java.lang.String |
getCountyDistrict()
|
java.lang.String |
getDisplayString()
Gets a descriptive String used for display purposes This is meant as an alternative to using the toString() to display this object to a user |
java.lang.Integer |
getId()
|
java.lang.String |
getLatitude()
|
java.lang.Integer |
getLocationId()
|
java.lang.String |
getLongitude()
|
java.lang.String |
getNeighborhoodCell()
|
Location |
getParentLocation()
|
java.util.List<Location> |
getPossibleValues()
Find all possible values of this object. |
java.lang.String |
getPostalCode()
|
java.lang.String |
getRegion()
|
java.lang.String |
getStateProvince()
|
java.lang.String |
getSubregion()
|
java.util.Set<LocationTag> |
getTags()
|
java.lang.String |
getTownshipDivision()
|
int |
hashCode()
|
java.lang.Boolean |
hasTag(java.lang.String tagToFind)
Checks whether the Location has a particular tag. |
Location |
hydrate(java.lang.String locationId)
Deserialize the given string into a full object |
static java.lang.Boolean |
isInHierarchy(Location location,
Location root)
Checks whether 'location' is a member of the tree starting at 'root'. |
void |
removeChildLocation(Location child)
|
void |
removeTag(LocationTag tag)
Remove the tag from the Location. |
java.lang.String |
serialize()
Turn the current object into an identifying string that can be retrieved later |
void |
setAddress1(java.lang.String address1)
|
void |
setAddress2(java.lang.String address2)
|
void |
setAddress3(java.lang.String address3)
Added for compatibility reasons with 1.8+ |
void |
setAddress4(java.lang.String address4)
Added for compatibility reasons with 1.8+ |
void |
setAddress5(java.lang.String address5)
Added for compatibility reasons with 1.8+ |
void |
setAddress6(java.lang.String address6)
Added for compatibility reasons with 1.8+ |
void |
setChildLocations(java.util.Set<Location> childLocations)
|
void |
setCityVillage(java.lang.String cityVillage)
|
void |
setCountry(java.lang.String country)
|
void |
setCountyDistrict(java.lang.String countyDistrict)
|
void |
setId(java.lang.Integer id)
|
void |
setLatitude(java.lang.String latitude)
|
void |
setLocationId(java.lang.Integer locationId)
|
void |
setLongitude(java.lang.String longitude)
|
void |
setNeighborhoodCell(java.lang.String neighborhoodCell)
|
void |
setParentLocation(Location parentLocationId)
|
void |
setPostalCode(java.lang.String postalCode)
|
void |
setRegion(java.lang.String region)
|
void |
setStateProvince(java.lang.String stateProvince)
|
void |
setSubregion(java.lang.String subregion)
|
void |
setTags(java.util.Set<LocationTag> tags)
Set the tags which are attached to this Location. |
void |
setTownshipDivision(java.lang.String townshipDivision)
|
java.lang.String |
toString()
|
Methods inherited from class org.openmrs.BaseOpenmrsMetadata |
---|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason |
Methods inherited from class org.openmrs.BaseOpenmrsObject |
---|
getUuid, setUuid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openmrs.OpenmrsObject |
---|
getUuid, setUuid |
Field Detail |
---|
public static final long serialVersionUID
public static final int LOCATION_UNKNOWN
Constructor Detail |
---|
public Location()
public Location(java.lang.Integer locationId)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
-
public int hashCode()
hashCode
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.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.Integer getLocationId()
public void setLocationId(java.lang.Integer locationId)
locationId
- The locationId 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 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 toString()
toString
in class java.lang.Object
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.public java.lang.String getNeighborhoodCell()
public void setNeighborhoodCell(java.lang.String neighborhoodCell)
neighborhoodCell
- The neighborhoodCell to set.public java.util.List<Location> findPossibleValues(java.lang.String searchText)
Attributable
findPossibleValues
in interface Attributable<Location>
searchText
- String to search on
Attributable.findPossibleValues(java.lang.String)
public java.util.List<Location> getPossibleValues()
Attributable
getPossibleValues
in interface Attributable<Location>
Attributable.getPossibleValues()
public Location hydrate(java.lang.String locationId)
Attributable
hydrate
in interface Attributable<Location>
locationId
- String to deserialize
Attributable.hydrate(java.lang.String)
public java.lang.String serialize()
Attributable
serialize
in interface Attributable<Location>
Attributable.serialize()
public java.lang.String getDisplayString()
Attributable
getDisplayString
in interface Attributable<Location>
Attributable.getDisplayString()
public java.lang.String getRegion()
public void setRegion(java.lang.String region)
region
- the region to setpublic java.lang.String getSubregion()
public void setSubregion(java.lang.String subregion)
subregion
- the subregion to setpublic java.lang.String getTownshipDivision()
public void setTownshipDivision(java.lang.String townshipDivision)
townshipDivision
- the townshipDivision to setpublic Location getParentLocation()
public void setParentLocation(Location parentLocationId)
parentLocationId
- The parentLocation to set.public java.util.Set<Location> getChildLocations()
public java.util.Set<Location> getChildLocations(boolean includeRetired)
includeRetired
- specifies whether or not to include voided childLocations
public void setChildLocations(java.util.Set<Location> childLocations)
childLocations
- The childLocations to set.public void addChildLocation(Location child)
child
- The child location to add.public static java.lang.Boolean isInHierarchy(Location location, Location root)
location
- The location to be tested.root
- Location node from which to start the testing (down in the hierarchy).public void removeChildLocation(Location child)
child
- The child location to remove.public java.util.Set<LocationTag> getTags()
public void setTags(java.util.Set<LocationTag> tags)
tags
- The tags to set.public void addTag(LocationTag tag)
tag
- The tag to add.public void removeTag(LocationTag tag)
tag
- The tag to remove.public java.lang.Boolean hasTag(java.lang.String tagToFind)
tagToFind
- the string of the tag for which to check
public 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.lang.String getAddress3()
getAddress3
in interface Address
public void setAddress3(java.lang.String address3)
setAddress3
in interface Address
public java.lang.String getAddress4()
getAddress4
in interface Address
public void setAddress4(java.lang.String address4)
setAddress4
in interface Address
public java.lang.String getAddress5()
getAddress5
in interface Address
public void setAddress5(java.lang.String address5)
setAddress5
in interface Address
public void setAddress6(java.lang.String address6)
setAddress6
in interface Address
public java.lang.String getAddress6()
getAddress6
in interface Address
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |