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.
|
java.util.List<LocationAttributeType> |
getAllLocationAttributeTypes() |
java.util.List<Location> |
getAllLocations(boolean includeRetired)
Get all locations
|
java.util.List<LocationTag> |
getAllLocationTags(boolean includeRetired)
Get all location tags
|
java.lang.Long |
getCountOfLocations(java.lang.String nameFragment,
java.lang.Boolean includeRetired) |
Location |
getLocation(java.lang.Integer locationId)
Get a location by locationId
|
Location |
getLocation(java.lang.String name)
Get a location by name
|
LocationAttribute |
getLocationAttributeByUuid(java.lang.String uuid) |
LocationAttributeType |
getLocationAttributeType(java.lang.Integer id) |
LocationAttributeType |
getLocationAttributeTypeByUuid(java.lang.String uuid) |
Location |
getLocationByUuid(java.lang.String uuid) |
java.util.List<Location> |
getLocations(java.lang.String nameFragment,
Location parent,
java.util.Map<LocationAttributeType,java.lang.String> serializedAttributeValues,
boolean includeRetired,
java.lang.Integer start,
java.lang.Integer length)
Gets the locations matching the specified arguments
|
java.util.List<Location> |
getLocationsHavingAllTags(java.util.List<LocationTag> locationTagIdList)
Get locations that have all the location tags specified.
|
LocationTag |
getLocationTag(java.lang.Integer locationTagId)
Get a location tag by
locationTagId |
LocationTag |
getLocationTagByName(java.lang.String tag)
Get a location tag by name
|
LocationTag |
getLocationTagByUuid(java.lang.String uuid) |
java.util.List<LocationTag> |
getLocationTags(java.lang.String search)
Find all location tags with matching names.
|
java.util.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(java.lang.Integer locationId)
locationId - Internal Integer identifier of the Location to getLocationLocation getLocation(java.lang.String name)
name - String name of the Location to getLocationjava.util.List<Location> getAllLocations(boolean includeRetired)
includeRetired - boolean - include retired locations as well?List object of all Locations, possibly including
retired locationsjava.util.List<Location> getLocations(java.lang.String nameFragment, Location parent, java.util.Map<LocationAttributeType,java.lang.String> serializedAttributeValues, boolean includeRetired, java.lang.Integer start, java.lang.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(java.lang.Integer locationTagId)
locationTagIdlocationTagId - Internal Integer identifier of the tag to getLocationTagLocationTag getLocationTagByName(java.lang.String tag)
tag - String representation of the LocationTag to getLocationTagjava.util.List<LocationTag> getAllLocationTags(boolean includeRetired)
includeRetired - boolean - include retired tags as well?LocationTags, possibly included
retired onesjava.util.List<LocationTag> getLocationTags(java.lang.String search)
search - name to searchLocationTagsvoid deleteLocationTag(LocationTag tag)
tag - The LocationTag to deleteLocation getLocationByUuid(java.lang.String uuid)
uuid - the uuid to look forLocationTag getLocationTagByUuid(java.lang.String uuid)
uuid - java.lang.Long getCountOfLocations(java.lang.String nameFragment,
java.lang.Boolean includeRetired)
java.util.List<Location> getRootLocations(boolean includeRetired)
java.util.List<LocationAttributeType> getAllLocationAttributeTypes()
LocationAttributeType getLocationAttributeType(java.lang.Integer id)
LocationAttributeType getLocationAttributeTypeByUuid(java.lang.String uuid)
LocationAttributeType saveLocationAttributeType(LocationAttributeType locationAttributeType)
void deleteLocationAttributeType(LocationAttributeType locationAttributeType)
LocationAttribute getLocationAttributeByUuid(java.lang.String uuid)
java.util.List<Location> getLocationsHavingAllTags(java.util.List<LocationTag> locationTagIdList)
locationTagIdList - Copyright © 2018 OpenMRS Inc.. All Rights Reserved.