|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@Transactional public interface LocationService
API methods for managing Locations
Use:
List
Context| Method Summary | |
|---|---|
java.util.List<Location> |
getAllLocations()
Returns all locations, includes retired locations. |
java.util.List<Location> |
getAllLocations(boolean includeRetired)
Returns all locations. |
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 |
getLocationByGuid(java.lang.String guid)
Returns a location by guid TODO: Not yet implemented. |
java.util.List<Location> |
getLocations(java.lang.String nameFragment)
Returns locations that match the beginning of the given string. |
void |
purgeLocation(Location location)
Completely remove a location from the database (not reversible) This method delegates to #purgeLocation(location, boolean) method |
Location |
retireLocation(Location location,
java.lang.String reason)
Retires the given location. |
Location |
saveLocation(Location location)
Save location 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. |
| Methods inherited from interface org.openmrs.api.OpenmrsService |
|---|
onShutdown, onStartup |
| Method Detail |
|---|
void setLocationDAO(LocationDAO dao)
dao -
@Authorized(value="Manage Locations")
Location saveLocation(Location location)
throws APIException
location - is the location to be saved to the database
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
Location getLocation(java.lang.Integer locationId)
throws APIException
locationId A null value is returned if no location exists
with this location.
locationId - integer primary key of the location to find
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
Location getLocation(java.lang.String name)
throws APIException
name A null
value is returned if there is no location with this name
name - the exact name of the location to match on
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
Location getLocationByGuid(java.lang.String guid)
throws APIException
guid - is the guid of the desired location
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
java.util.List<Location> getAllLocations()
throws APIException
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
java.util.List<Location> getAllLocations(boolean includeRetired)
throws APIException
includeRetired - whether or not to include retired locations
APIException
@Transactional(readOnly=true)
@Authorized(value="View Locations")
java.util.List<Location> getLocations(java.lang.String nameFragment)
throws APIException
nameFragment
nameFragment - is the string used to search for locations
APIException
@Authorized(value="Manage Locations")
Location retireLocation(Location location,
java.lang.String reason)
throws APIException
location - location to be retiredreason - is the reason why the location is being retired
APIException
@Authorized(value="Manage Locations")
Location unretireLocation(Location location)
throws APIException
location -
APIException
@Authorized(value="Purge Locations")
void purgeLocation(Location location)
throws APIException
location - the Location to clean out of the database.
APIException
|
OpenMRS-trunk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||