public interface LocationDAO
Modifier and Type | Method and Description |
---|---|
void |
deleteLocation(Location location)
Completely remove the location from the database.
|
void |
deleteLocationAttributeType(LocationAttributeType locationAttributeType) |
void |
deleteLocationTag(LocationTag tag)
Completely remove the location tag from the database.
|
List<LocationAttributeType> |
getAllLocationAttributeTypes() |
List<Location> |
getAllLocations(boolean includeRetired)
Get all locations
|
List<LocationTag> |
getAllLocationTags(boolean includeRetired)
Get all location tags
|
Long |
getCountOfLocations(String nameFragment,
Boolean includeRetired) |
Location |
getLocation(Integer locationId)
Get a location by locationId
|
Location |
getLocation(String name)
Get a location by name
|
LocationAttribute |
getLocationAttributeByUuid(String uuid) |
LocationAttributeType |
getLocationAttributeType(Integer id) |
LocationAttributeType |
getLocationAttributeTypeByName(String name) |
LocationAttributeType |
getLocationAttributeTypeByUuid(String uuid) |
Location |
getLocationByUuid(String uuid) |
List<Location> |
getLocations(String nameFragment,
Location parent,
Map<LocationAttributeType,String> serializedAttributeValues,
boolean includeRetired,
Integer start,
Integer length)
Gets the locations matching the specified arguments
|
List<Location> |
getLocationsHavingAllTags(List<LocationTag> locationTagIdList)
Get locations that have all the location tags specified.
|
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.
|
List<Location> |
getRootLocations(boolean includeRetired) |
Location |
saveLocation(Location location)
Create or update a location.
|
LocationAttributeType |
saveLocationAttributeType(LocationAttributeType locationAttributeType) |
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 getLocation
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<Location>
object of all Location
s, possibly including
retired locationsList<Location> getLocations(String nameFragment, Location parent, Map<LocationAttributeType,String> serializedAttributeValues, boolean includeRetired, Integer start, Integer length) throws DAOException
nameFragment
- is the string used to search for locationsparent
- only return children of this parentserializedAttributeValues
- the serialized attribute valuesincludeRetired
- specifies if retired locations should also be returnedstart
- the beginning indexlength
- the number of matching locations to returnDAOException
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
- List<LocationAttributeType> getAllLocationAttributeTypes()
LocationAttributeType getLocationAttributeType(Integer id)
LocationAttributeType getLocationAttributeTypeByUuid(String uuid)
LocationAttributeType saveLocationAttributeType(LocationAttributeType locationAttributeType)
void deleteLocationAttributeType(LocationAttributeType locationAttributeType)
LocationAttribute getLocationAttributeByUuid(String uuid)
LocationAttributeType getLocationAttributeTypeByName(String name)
List<Location> getLocationsHavingAllTags(List<LocationTag> locationTagIdList)
locationTagIdList
- Copyright © 2024 OpenMRS Inc.. All rights reserved.