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 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<Location> object of all Locations, 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 returnDAOExceptionvoid 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 - 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.