|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.api.impl.BaseOpenmrsService
org.openmrs.api.impl.LocationServiceImpl
public class LocationServiceImpl
Default implementation of the LocationService
This class should not be instantiated alone, get a service class from the Context: Context.getLocationService();
Context,
LocationService,
Location| Constructor Summary | |
|---|---|
LocationServiceImpl()
|
|
| Method Summary | |
|---|---|
java.util.List<Location> |
getAllLocations()
Returns all locations, includes retired locations. |
java.util.List<Location> |
getAllLocations(boolean includeRetired)
Returns all locations. |
java.util.List<LocationTag> |
getAllLocationTags()
Returns all location tags, includes retired location tags. |
java.util.List<LocationTag> |
getAllLocationTags(boolean includeRetired)
Returns all location tags. |
Location |
getDefaultLocation()
Returns the default location for this implementation. |
Location |
getLocation(java.lang.Integer locationId)
Returns a location given that locations primary key locationId A null value is
returned if no location exists with this location. |
Location |
getLocation(java.lang.String name)
Returns a location given the location's exact name A null value is returned if
there is no location with this name |
Location |
getLocationByUuid(java.lang.String uuid)
Returns a location by uuid |
java.util.List<Location> |
getLocations(java.lang.String nameFragment)
Returns locations that match the beginning of the given string. |
java.util.List<Location> |
getLocationsByTag(LocationTag tag)
Returns locations that contain the given tag. |
java.util.List<Location> |
getLocationsHavingAllTags(java.util.List<LocationTag> tags)
Returns locations that are mapped to all given tags. |
java.util.List<Location> |
getLocationsHavingAnyTag(java.util.List<LocationTag> tags)
Returns locations that are mapped to any of the given tags. |
LocationTag |
getLocationTag(java.lang.Integer locationTagId)
Returns a location tag given that locations primary key locationTagId. |
LocationTag |
getLocationTagByName(java.lang.String tag)
Returns a location tag given the location's exact name (tag). |
LocationTag |
getLocationTagByUuid(java.lang.String uuid)
Returns a location tag by uuid |
java.util.List<LocationTag> |
getLocationTags(java.lang.String search)
Returns location tags that match the beginning of the given string. |
java.util.List<java.lang.String> |
getPossibleAddressValues(Address incomplete,
java.lang.String fieldName)
Given an Address object, returns all the possible values for the specified AddressField. |
void |
purgeLocation(Location location)
Completely remove a location from the database (not reversible) This method delegates to #purgeLocation(location, boolean) method |
void |
purgeLocationTag(LocationTag tag)
Completely remove a location tag from the database (not reversible). |
Location |
retireLocation(Location location,
java.lang.String reason)
Retires the given location. |
LocationTag |
retireLocationTag(LocationTag tag,
java.lang.String reason)
Retire the given location tag. |
Location |
saveLocation(Location location)
Save location to database (create if new or update if changed) |
LocationTag |
saveLocationTag(LocationTag tag)
Save location tag to database (create if new or update if changed) |
void |
setLocationDAO(LocationDAO dao)
Set the data access object that the service will use to interact with the database. |
Location |
unretireLocation(Location location)
Unretire the given location. |
LocationTag |
unretireLocationTag(LocationTag tag)
Unretire the given location tag. |
| Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
|---|
onShutdown, onStartup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openmrs.api.OpenmrsService |
|---|
onShutdown, onStartup |
| Constructor Detail |
|---|
public LocationServiceImpl()
| Method Detail |
|---|
public void setLocationDAO(LocationDAO dao)
LocationService
setLocationDAO in interface LocationServiceLocationService.setLocationDAO(org.openmrs.api.db.LocationDAO)
public Location saveLocation(Location location)
throws APIException
LocationService
saveLocation in interface LocationServicelocation - is the location to be saved to the database
APIExceptionLocationService.saveLocation(org.openmrs.Location)
public Location getLocation(java.lang.Integer locationId)
throws APIException
LocationServicelocationId A null value is
returned if no location exists with this location.
getLocation in interface LocationServicelocationId - integer primary key of the location to find
locationId passed in.
APIExceptionLocationService.getLocation(java.lang.Integer)
public Location getLocation(java.lang.String name)
throws APIException
LocationServicename A null value is returned if
there is no location with this name
getLocation in interface LocationServicename - the exact name of the location to match on
name to Location.name
APIExceptionLocationService.getLocation(java.lang.String)
public Location getDefaultLocation()
throws APIException
LocationService
getDefaultLocation in interface LocationServiceAPIExceptionLocationService.getDefaultLocation()
public Location getLocationByUuid(java.lang.String uuid)
throws APIException
LocationService
getLocationByUuid in interface LocationServiceuuid - is the uuid of the desired location
APIExceptionLocationService.getLocationByUuid(java.lang.String)
public LocationTag getLocationTagByUuid(java.lang.String uuid)
throws APIException
LocationService
getLocationTagByUuid in interface LocationServiceuuid - is the uuid of the desired location tag
APIExceptionLocationService.getLocationTagByUuid(java.lang.String)
public java.util.List<Location> getAllLocations()
throws APIException
LocationService
getAllLocations in interface LocationServiceAPIExceptionLocationService.getAllLocations()
public java.util.List<Location> getAllLocations(boolean includeRetired)
throws APIException
LocationService
getAllLocations in interface LocationServiceincludeRetired - whether or not to include retired locations
APIExceptionLocationService.getAllLocations(boolean)
public java.util.List<Location> getLocations(java.lang.String nameFragment)
throws APIException
LocationServicenameFragment
getLocations in interface LocationServicenameFragment - is the string used to search for locations
APIExceptionLocationService.getLocations(java.lang.String)
public java.util.List<Location> getLocationsByTag(LocationTag tag)
throws APIException
LocationService
getLocationsByTag in interface LocationServicetag - LocationTag criterion
APIExceptionLocationService.getLocationsByTag(LocationTag)
public java.util.List<Location> getLocationsHavingAllTags(java.util.List<LocationTag> tags)
throws APIException
LocationService
getLocationsHavingAllTags in interface LocationServicetags - Set of LocationTag criteria
APIExceptionLocationService.getLocationsHavingAllTags(List)
public java.util.List<Location> getLocationsHavingAnyTag(java.util.List<LocationTag> tags)
throws APIException
LocationService
getLocationsHavingAnyTag in interface LocationServicetags - Set of LocationTag criteria
APIExceptionLocationService.getLocationsHavingAnyTag(List)
public Location retireLocation(Location location,
java.lang.String reason)
throws APIException
LocationService
retireLocation in interface LocationServicelocation - location to be retiredreason - is the reason why the location is being retired
APIExceptionLocationService.retireLocation(Location, String)
public Location unretireLocation(Location location)
throws APIException
LocationService
unretireLocation in interface LocationServiceAPIExceptionLocationService.unretireLocation(org.openmrs.Location)
public void purgeLocation(Location location)
throws APIException
LocationService
purgeLocation in interface LocationServicelocation - the Location to clean out of the database.
APIExceptionLocationService.purgeLocation(org.openmrs.Location)
public LocationTag saveLocationTag(LocationTag tag)
throws APIException
LocationService
saveLocationTag in interface LocationServicetag - is the tag to be saved to the database
APIExceptionLocationService.saveLocationTag(org.openmrs.LocationTag)
public LocationTag getLocationTag(java.lang.Integer locationTagId)
throws APIException
LocationServicelocationTagId. A null
value is returned if no tag exists with this ID.
getLocationTag in interface LocationServicelocationTagId - integer primary key of the location tag to find
locationTagId
passed in.
APIExceptionLocationService.getLocationTag(java.lang.Integer)
public LocationTag getLocationTagByName(java.lang.String tag)
throws APIException
LocationService
getLocationTagByName in interface LocationServicetag - the exact name of the tag to match on
APIExceptionLocationService.getLocationTagByName(java.lang.String)
public java.util.List<LocationTag> getAllLocationTags()
throws APIException
LocationService
getAllLocationTags in interface LocationServiceAPIExceptionLocationService.getAllLocationTags()
public java.util.List<LocationTag> getAllLocationTags(boolean includeRetired)
throws APIException
LocationService
getAllLocationTags in interface LocationServiceincludeRetired - whether or not to include retired location tags
APIExceptionLocationService.getAllLocationTags(boolean)
public java.util.List<LocationTag> getLocationTags(java.lang.String search)
throws APIException
LocationServicesearch
getLocationTags in interface LocationServicesearch - is the string used to search for tags
APIExceptionLocationService.getLocationTags(java.lang.String)
public LocationTag retireLocationTag(LocationTag tag,
java.lang.String reason)
throws APIException
LocationService
retireLocationTag in interface LocationServicetag - location tag to be retiredreason - is the reason why the location tag is being retired
APIExceptionLocationService.retireLocationTag(LocationTag, String)
public LocationTag unretireLocationTag(LocationTag tag)
throws APIException
LocationService
unretireLocationTag in interface LocationServiceAPIExceptionLocationService.unretireLocationTag(org.openmrs.LocationTag)
public void purgeLocationTag(LocationTag tag)
throws APIException
LocationService
purgeLocationTag in interface LocationServicetag - the LocationTag to clean out of the database.
APIExceptionLocationService.purgeLocationTag(org.openmrs.LocationTag)
public java.util.List<java.lang.String> getPossibleAddressValues(Address incomplete,
java.lang.String fieldName)
throws APIException
LocationService
getPossibleAddressValues in interface LocationServiceincomplete - the incomplete address
APIExceptionorg.openmrs.api.LocationService#getPossibleAddressValues(org.openmrs.Address, org.openmrs.AddressField)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||