public interface LocationDAO
| Modifier and Type | Method and Description |
|---|---|
void |
deleteLocation(Location location)
Completely remove the location from the database.
|
void |
deleteLocationTag(LocationTag tag)
Completely remove the location tag from the database.
|
List<Location> |
getAllLocations(boolean includeRetired)
Get all locations
|
List<LocationTag> |
getAllLocationTags(boolean includeRetired)
Get all location tags
|
Integer |
getCountOfLocations(String nameFragment,
Boolean includeRetired) |
Location |
getLocation(Integer locationId)
Get a location by locationId
|
Location |
getLocation(String name)
Get a location by name
|
Location |
getLocationByUuid(String uuid) |
List<Location> |
getLocations(String nameFragment,
boolean includeRetired,
Integer start,
Integer length)
Returns a specified number of locations starting with a given string from the specified index
|
LocationTag |
getLocationTag(Integer locationTagId)
Get a location tag by
locationTagId |
LocationTag |
getLocationTagByName(String tag)
Get a location tag by name
|
LocationTag |
getLocationTagByUuid(String uuid) |
List<LocationTag> |
getLocationTags(String search)
Find all location tags with matching names.
|
Location |
saveLocation(Location location)
Create or update a location.
|
LocationTag |
saveLocationTag(LocationTag tag)
Create or update a location tag.
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set the Hibernate SessionFactory to connect to the database.
|
void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory - Location saveLocation(Location location)
location - Location to saveLocationLocation getLocation(Integer locationId)
locationId - Internal Integer identifier of the Location to getLocationLocation getLocation(String name)
name - String name of the Location to getLocationList<Location> getAllLocations(boolean includeRetired)
includeRetired - boolean - include retired locations as well?List object of all Locations, possibly including
retired locationsList<Location> getLocations(String nameFragment, boolean includeRetired, Integer start, Integer length) throws DAOException
DAOExceptionLocationService.getLocations(String, boolean, Integer, Integer)void deleteLocation(Location location)
location - Location object to deleteLocationTag saveLocationTag(LocationTag tag)
tag - LocationTagLocationTag getLocationTag(Integer locationTagId)
locationTagIdlocationTagId - Internal Integer identifier of the tag to getLocationTagLocationTag getLocationTagByName(String tag)
tag - String representation of the LocationTag to getLocationTagList<LocationTag> getAllLocationTags(boolean includeRetired)
includeRetired - boolean - include retired tags as well?LocationTags, possibly included
retired onesList<LocationTag> getLocationTags(String search)
search - name to searchLocationTagsvoid deleteLocationTag(LocationTag tag)
tag - The LocationTag to deleteLocation getLocationByUuid(String uuid)
uuid - the uuid to look forLocationTag getLocationTagByUuid(String uuid)
uuid - Copyright © 2018 OpenMRS LLC.. All Rights Reserved.