org.openmrs.api.db.hibernate
Class HibernateObsDAO

java.lang.Object
  extended by org.openmrs.api.db.hibernate.HibernateObsDAO
All Implemented Interfaces:
ObsDAO

public class HibernateObsDAO
extends java.lang.Object
implements ObsDAO

Hibernate specific Observation related functions This class should not be used directly. All calls should go through the ObsService methods.

See Also:
ObsDAO, ObsService

Field Summary
protected  org.apache.commons.logging.Log log
           
protected  org.hibernate.SessionFactory sessionFactory
           
 
Constructor Summary
HibernateObsDAO()
           
 
Method Summary
 void deleteMimeType(MimeType mimeType)
          Deprecated.  
 void deleteObs(Obs obs)
           
 java.util.List<MimeType> getAllMimeTypes(boolean includeRetired)
          Deprecated.  
 MimeType getMimeType(java.lang.Integer mimeTypeId)
          Deprecated.  
 Obs getObs(java.lang.Integer obsId)
           
 Obs getObsByUuid(java.lang.String uuid)
          Auto generated method comment
 java.lang.Integer getObservationCount(java.util.List<Person> whom, java.util.List<Encounter> encounters, java.util.List<Concept> questions, java.util.List<Concept> answers, java.util.List<OpenmrsConstants.PERSON_TYPE> personTypes, java.util.List<Location> locations, java.lang.Integer obsGroupId, java.util.Date fromDate, java.util.Date toDate, java.util.List<ConceptName> valueCodedNameAnswers, boolean includeVoidedObs)
           
 java.util.List<Obs> getObservations(java.util.List<Person> whom, java.util.List<Encounter> encounters, java.util.List<Concept> questions, java.util.List<Concept> answers, java.util.List<OpenmrsConstants.PERSON_TYPE> personTypes, java.util.List<Location> locations, java.util.List<java.lang.String> sortList, java.lang.Integer mostRecentN, java.lang.Integer obsGroupId, java.util.Date fromDate, java.util.Date toDate, boolean includeVoidedObs)
           
 MimeType saveMimeType(MimeType mimeType)
          Deprecated.  
 Obs saveObs(Obs obs)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set session factory that allows us to connect to the database that Hibernate knows about.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log

sessionFactory

protected org.hibernate.SessionFactory sessionFactory
Constructor Detail

HibernateObsDAO

public HibernateObsDAO()
Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory that allows us to connect to the database that Hibernate knows about.

Parameters:
sessionFactory -

deleteObs

public void deleteObs(Obs obs)
               throws DAOException
Specified by:
deleteObs in interface ObsDAO
Throws:
DAOException
See Also:
ObsService.deleteObs(org.openmrs.Obs)

getObs

public Obs getObs(java.lang.Integer obsId)
           throws DAOException
Specified by:
getObs in interface ObsDAO
Throws:
DAOException
See Also:
ObsService.getObs(java.lang.Integer)

getMimeType

@Deprecated
public MimeType getMimeType(java.lang.Integer mimeTypeId)
                     throws DAOException
Deprecated. 

Specified by:
getMimeType in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.getMimeType(java.lang.Integer)

getAllMimeTypes

@Deprecated
public java.util.List<MimeType> getAllMimeTypes(boolean includeRetired)
                                         throws DAOException
Deprecated. 

Specified by:
getAllMimeTypes in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.getAllMimeTypes(boolean)

saveMimeType

@Deprecated
public MimeType saveMimeType(MimeType mimeType)
                      throws DAOException
Deprecated. 

Specified by:
saveMimeType in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.saveMimeType(org.openmrs.MimeType)

deleteMimeType

@Deprecated
public void deleteMimeType(MimeType mimeType)
                    throws DAOException
Deprecated. 

Specified by:
deleteMimeType in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.deleteMimeType(org.openmrs.MimeType)

saveObs

public Obs saveObs(Obs obs)
            throws DAOException
Specified by:
saveObs in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.saveObs(org.openmrs.Obs)

getObservations

public java.util.List<Obs> getObservations(java.util.List<Person> whom,
                                           java.util.List<Encounter> encounters,
                                           java.util.List<Concept> questions,
                                           java.util.List<Concept> answers,
                                           java.util.List<OpenmrsConstants.PERSON_TYPE> personTypes,
                                           java.util.List<Location> locations,
                                           java.util.List<java.lang.String> sortList,
                                           java.lang.Integer mostRecentN,
                                           java.lang.Integer obsGroupId,
                                           java.util.Date fromDate,
                                           java.util.Date toDate,
                                           boolean includeVoidedObs)
                                    throws DAOException
Specified by:
getObservations in interface ObsDAO
Throws:
DAOException
See Also:
ObsDAO.getObservations(List, List, List, List, List, List, List, Integer, Integer, Date, Date, boolean)

getObservationCount

public java.lang.Integer getObservationCount(java.util.List<Person> whom,
                                             java.util.List<Encounter> encounters,
                                             java.util.List<Concept> questions,
                                             java.util.List<Concept> answers,
                                             java.util.List<OpenmrsConstants.PERSON_TYPE> personTypes,
                                             java.util.List<Location> locations,
                                             java.lang.Integer obsGroupId,
                                             java.util.Date fromDate,
                                             java.util.Date toDate,
                                             java.util.List<ConceptName> valueCodedNameAnswers,
                                             boolean includeVoidedObs)
                                      throws DAOException
Specified by:
getObservationCount in interface ObsDAO
Throws:
DAOException
See Also:
org.openmrs.api.db.ObsDAO#getObservationCount(java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.lang.Integer, java.util.Date, java.util.Date, boolean)

getObsByUuid

public Obs getObsByUuid(java.lang.String uuid)
Description copied from interface: ObsDAO
Auto generated method comment

Specified by:
getObsByUuid in interface ObsDAO
Returns:
See Also:
ObsDAO.getObsByUuid(java.lang.String)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change