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 saveLocation
Location getLocation(Integer locationId)
locationId
- Internal Integer
identifier of the Location to get
Location
Location getLocation(String name)
name
- String name of the Location
to getLocation
List<Location> getAllLocations(boolean includeRetired)
includeRetired
- boolean - include retired locations as well?List
object of all Location
s, possibly including
retired locationsList<Location> getLocations(String nameFragment, boolean includeRetired, Integer start, Integer length) throws DAOException
DAOException
LocationService.getLocations(String, boolean, Integer, Integer)
void deleteLocation(Location location)
location
- Location
object to deleteLocationTag saveLocationTag(LocationTag tag)
tag
- LocationTag
LocationTag getLocationTag(Integer locationTagId)
locationTagId
locationTagId
- Internal Integer
identifier of the tag to getLocationTag
LocationTag getLocationTagByName(String tag)
tag
- String representation of the LocationTag
to getLocationTag
List<LocationTag> getAllLocationTags(boolean includeRetired)
includeRetired
- boolean - include retired tags as well?LocationTag
s, possibly included
retired onesList<LocationTag> getLocationTags(String search)
search
- name to searchLocationTags
void 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.