@Entity public class Location extends BaseCustomizableMetadata<LocationAttribute> implements Serializable, Attributable<Location>, Address
LocationTag
s.
Note: Prior to version 1.9 this class extended BaseMetadataModifier and Type | Field and Description |
---|---|
static int |
LOCATION_UNKNOWN |
static long |
serialVersionUID |
Constructor and Description |
---|
Location()
default constructor
|
Location(Integer locationId)
constructor with id
|
Modifier and Type | Method and Description |
---|---|
void |
addChildLocation(Location child) |
void |
addTag(LocationTag tag)
Attaches a tag to the Location.
|
List<Location> |
findPossibleValues(String searchText)
Deprecated.
|
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() |
Set<Location> |
getChildLocations() |
Set<Location> |
getChildLocations(boolean includeRetired)
Returns all childLocations where child.locationId = this.locationId.
|
String |
getCityVillage() |
String |
getCountry() |
String |
getCountyDistrict() |
Set<Location> |
getDescendantLocations(boolean includeRetired)
Returns the descendant locations.
|
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
|
Integer |
getId() |
String |
getLatitude() |
Integer |
getLocationId() |
String |
getLongitude() |
Location |
getParentLocation() |
List<Location> |
getPossibleValues()
Deprecated.
|
String |
getPostalCode() |
String |
getStateProvince() |
Set<LocationTag> |
getTags() |
Concept |
getType() |
Boolean |
hasTag(String tagToFind)
Checks whether the Location has a particular tag.
|
Location |
hydrate(String locationId)
Deserialize the given string into a full object
|
static 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.
|
String |
serialize()
Turn the current object into an identifying string that can be retrieved later
|
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 |
setChildLocations(Set<Location> childLocations) |
void |
setCityVillage(String cityVillage) |
void |
setCountry(String country) |
void |
setCountyDistrict(String countyDistrict) |
void |
setId(Integer id) |
void |
setLatitude(String latitude) |
void |
setLocationId(Integer locationId) |
void |
setLongitude(String longitude) |
void |
setParentLocation(Location parentLocationId) |
void |
setPostalCode(String postalCode) |
void |
setStateProvince(String stateProvince) |
void |
setTags(Set<LocationTag> tags)
Set the tags which are attached to this Location.
|
void |
setType(Concept type) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
addAttribute, getActiveAttributes, getActiveAttributes, getAttributes, setAttribute, setAttributes
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public static final int LOCATION_UNKNOWN
public Location()
public Location(Integer locationId)
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 String getLatitude()
getLatitude
in interface Address
public void setLatitude(String latitude)
setLatitude
in interface Address
latitude
- The latitude to set.public Integer getLocationId()
public void setLocationId(Integer locationId)
locationId
- The locationId to set.public String getLongitude()
getLongitude
in interface Address
public void setLongitude(String longitude)
setLongitude
in interface Address
longitude
- The longitude 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 toString()
BaseOpenmrsObject
ClassName{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 BaseOpenmrsObject
public String getCountyDistrict()
getCountyDistrict
in interface Address
public void setCountyDistrict(String countyDistrict)
setCountyDistrict
in interface Address
countyDistrict
- The countyDistrict to set.public Concept getType()
public void setType(Concept type)
type
- The Concept for the type of location this is@Deprecated public List<Location> findPossibleValues(String searchText)
Attributable
findPossibleValues
in interface Attributable<Location>
searchText
- String to search onAttributable.findPossibleValues(java.lang.String)
@Deprecated public List<Location> getPossibleValues()
Attributable
getPossibleValues
in interface Attributable<Location>
Attributable.getPossibleValues()
public Location hydrate(String locationId)
Attributable
hydrate
in interface Attributable<Location>
locationId
- String to deserializeAttributable.hydrate(java.lang.String)
public String serialize()
Attributable
serialize
in interface Attributable<Location>
Attributable.serialize()
public String getDisplayString()
Attributable
getDisplayString
in interface Attributable<Location>
Attributable.getDisplayString()
public Location getParentLocation()
public void setParentLocation(Location parentLocationId)
parentLocationId
- The parentLocation to set.public Set<Location> getChildLocations()
public Set<Location> getChildLocations(boolean includeRetired)
includeRetired
- specifies whether or not to include voided childLocationspublic Set<Location> getDescendantLocations(boolean includeRetired)
includeRetired
- specifies whether or not to include voided childLocationspublic void setChildLocations(Set<Location> childLocations)
childLocations
- The childLocations to set.public void addChildLocation(Location child)
child
- The child location to add.public static 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 Set<LocationTag> getTags()
public void setTags(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 Boolean hasTag(String tagToFind)
tagToFind
- the string of the tag for which to checkpublic 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)
public String getAddress7()
getAddress7
in interface Address
public void setAddress7(String address7)
setAddress7
in interface Address
public String getAddress8()
getAddress8
in interface Address
public void setAddress8(String address8)
setAddress8
in interface Address
public String getAddress9()
getAddress9
in interface Address
public void setAddress9(String address9)
setAddress9
in interface Address
public String getAddress10()
getAddress10
in interface Address
public void setAddress10(String address10)
setAddress10
in interface Address
public String getAddress11()
getAddress11
in interface Address
public void setAddress11(String address11)
setAddress11
in interface Address
public String getAddress12()
getAddress12
in interface Address
public void setAddress12(String address12)
setAddress12
in interface Address
public String getAddress13()
getAddress13
in interface Address
public void setAddress13(String address13)
setAddress13
in interface Address
public String getAddress14()
getAddress14
in interface Address
public void setAddress14(String address14)
setAddress14
in interface Address
public String getAddress15()
getAddress15
in interface Address
public void setAddress15(String address15)
setAddress15
in interface Address
Copyright © 2024 OpenMRS Inc.. All rights reserved.