|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.db.hibernate.HibernateLocationDAO
public class HibernateLocationDAO
Hibernate location-related database functions
Constructor Summary | |
---|---|
HibernateLocationDAO()
|
Method Summary | |
---|---|
void |
deleteLocation(Location location)
Completely remove the location from the database. |
void |
deleteLocationTag(LocationTag tag)
Completely remove the location tag from the database. |
java.util.List<Location> |
getAllLocations(boolean includeRetired)
Get all locations |
java.util.List<LocationTag> |
getAllLocationTags(boolean includeRetired)
Get all location tags |
Location |
getLocation(java.lang.Integer locationId)
Get a location by locationId |
Location |
getLocation(java.lang.String name)
Get a location by name |
Location |
getLocationByUuid(java.lang.String uuid)
|
java.util.List<Location> |
getLocations(java.lang.String search)
Find all locations with matching names. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateLocationDAO()
Method Detail |
---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
LocationDAO
setSessionFactory
in interface LocationDAO
LocationDAO.setSessionFactory(org.hibernate.SessionFactory)
public Location saveLocation(Location location)
LocationDAO
saveLocation
in interface LocationDAO
location
- Location
to save
Location
LocationDAO.saveLocation(org.openmrs.Location)
public Location getLocation(java.lang.Integer locationId)
LocationDAO
getLocation
in interface LocationDAO
locationId
- Internal Integer
identifier of the Location to get
- Returns:
- the requested
Location
- See Also:
LocationDAO.getLocation(java.lang.Integer)
public Location getLocation(java.lang.String name)
LocationDAO
getLocation
in interface LocationDAO
name
- String name of the Location
to get
Location
LocationDAO.getLocation(java.lang.String)
public java.util.List<Location> getAllLocations(boolean includeRetired)
LocationDAO
getAllLocations
in interface LocationDAO
includeRetired
- boolean - include retired locations as well?
List
object of all Location
s, possibly including
retired locationsLocationDAO.getAllLocations(boolean)
public java.util.List<Location> getLocations(java.lang.String search)
LocationDAO
getLocations
in interface LocationDAO
search
- String name to search for
List
object of matching locationsLocationDAO.getLocations(java.lang.String)
public void deleteLocation(Location location)
LocationDAO
deleteLocation
in interface LocationDAO
location
- Location
object to deleteLocationDAO.deleteLocation(org.openmrs.Location)
public LocationTag saveLocationTag(LocationTag tag)
LocationDAO
saveLocationTag
in interface LocationDAO
LocationTag
LocationDAO.saveLocation(org.openmrs.Location)
public LocationTag getLocationTag(java.lang.Integer locationTagId)
LocationDAO
locationTagId
getLocationTag
in interface LocationDAO
locationTagId
- Internal Integer
identifier of the tag to get
LocationTag
LocationDAO.getLocationTag(java.lang.Integer)
public LocationTag getLocationTagByName(java.lang.String tag)
LocationDAO
getLocationTagByName
in interface LocationDAO
tag
- String representation of the LocationTag
to get
LocationTag
LocationDAO.getLocationTagByName(java.lang.String)
public java.util.List<LocationTag> getAllLocationTags(boolean includeRetired)
LocationDAO
getAllLocationTags
in interface LocationDAO
includeRetired
- boolean - include retired tags as well?
LocationTag
s, possibly included
retired onesLocationDAO.getAllLocationTags(boolean)
public java.util.List<LocationTag> getLocationTags(java.lang.String search)
LocationDAO
getLocationTags
in interface LocationDAO
search
- name to search
LocationTags
LocationDAO.getLocations(java.lang.String)
public void deleteLocationTag(LocationTag tag)
LocationDAO
deleteLocationTag
in interface LocationDAO
tag
- The LocationTag
to deleteLocationDAO.deleteLocationTag(org.openmrs.LocationTag)
public Location getLocationByUuid(java.lang.String uuid)
getLocationByUuid
in interface LocationDAO
uuid
- the uuid to look for
LocationDAO.getLocationByUuid(java.lang.String)
public LocationTag getLocationTagByUuid(java.lang.String uuid)
getLocationTagByUuid
in interface LocationDAO
LocationDAO.getLocationTagByUuid(java.lang.String)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |