org.openmrs.api.db.hibernate
Class HibernateOrderDAO

java.lang.Object
  extended by org.openmrs.api.db.hibernate.HibernateOrderDAO
All Implemented Interfaces:
OrderDAO

public class HibernateOrderDAO
extends java.lang.Object
implements OrderDAO

This class should not be used directly. This is just a common implementation of the OrderDAO that is used by the OrderService. This class is injected by spring into the desired OrderService class. This injection is determined by the xml mappings and elements in the spring application context: /metadata/api/spring/applicationContext.xml.

The OrderService should be used for all Order related database manipulation.

See Also:
OrderService, OrderDAO

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
HibernateOrderDAO()
           
 
Method Summary
 void deleteOrder(Order order)
           
 void deleteOrderType(OrderType orderType)
           
 java.util.List<OrderType> getAllOrderTypes(boolean includeRetired)
           
<Ord extends Order>
Ord
getOrder(java.lang.Integer orderId, java.lang.Class<Ord> orderClassType)
           
 Order getOrderByUuid(java.lang.String uuid)
          Auto generated method comment
<Ord extends Order>
java.util.List<Ord>
getOrders(java.lang.Class<Ord> orderClassType, java.util.List<Patient> patients, java.util.List<Concept> concepts, OrderService.ORDER_STATUS status, java.util.List<User> orderers, java.util.List<Encounter> encounters, java.util.List<OrderType> orderTypes)
           
 OrderType getOrderType(java.lang.Integer orderTypeId)
           
 OrderType getOrderTypeByUuid(java.lang.String uuid)
          Auto generated method comment
 Order saveOrder(Order order)
           
 OrderType saveOrderType(OrderType orderType)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set session factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

HibernateOrderDAO

public HibernateOrderDAO()
Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory

Parameters:
sessionFactory -

saveOrderType

public OrderType saveOrderType(OrderType orderType)
                        throws DAOException
Specified by:
saveOrderType in interface OrderDAO
Throws:
DAOException
See Also:
OrderDAO.saveOrderType(org.openmrs.OrderType), OrderService.saveOrderType(org.openmrs.OrderType)

getOrderType

public OrderType getOrderType(java.lang.Integer orderTypeId)
                       throws DAOException
Specified by:
getOrderType in interface OrderDAO
Throws:
DAOException
See Also:
OrderDAO.getOrderType(java.lang.Integer), OrderService.getOrderType(java.lang.Integer)

getAllOrderTypes

public java.util.List<OrderType> getAllOrderTypes(boolean includeRetired)
                                           throws DAOException
Specified by:
getAllOrderTypes in interface OrderDAO
Throws:
DAOException
See Also:
OrderService.getOrderTypes()

deleteOrderType

public void deleteOrderType(OrderType orderType)
                     throws DAOException
Specified by:
deleteOrderType in interface OrderDAO
Throws:
DAOException
See Also:
OrderDAO.deleteOrderType(org.openmrs.OrderType), OrderService.purgeOrderType(org.openmrs.OrderType)

saveOrder

public Order saveOrder(Order order)
                throws DAOException
Specified by:
saveOrder in interface OrderDAO
Throws:
DAOException
See Also:
OrderDAO.saveOrder(org.openmrs.Order), OrderService.saveOrder(org.openmrs.Order)

deleteOrder

public void deleteOrder(Order order)
                 throws DAOException
Specified by:
deleteOrder in interface OrderDAO
Throws:
DAOException
See Also:
OrderDAO.deleteOrder(org.openmrs.Order), OrderService.purgeOrder(org.openmrs.Order)

getOrder

public <Ord extends Order> Ord getOrder(java.lang.Integer orderId,
                                        java.lang.Class<Ord> orderClassType)
                           throws DAOException
Specified by:
getOrder in interface OrderDAO
Throws:
DAOException
See Also:
OrderService.getOrder(java.lang.Integer)

getOrders

public <Ord extends Order> java.util.List<Ord> getOrders(java.lang.Class<Ord> orderClassType,
                                                         java.util.List<Patient> patients,
                                                         java.util.List<Concept> concepts,
                                                         OrderService.ORDER_STATUS status,
                                                         java.util.List<User> orderers,
                                                         java.util.List<Encounter> encounters,
                                                         java.util.List<OrderType> orderTypes)
Specified by:
getOrders in interface OrderDAO
See Also:
OrderDAO.getOrders(java.lang.Class, java.util.List, java.util.List, org.openmrs.api.OrderService.ORDER_STATUS, java.util.List, java.util.List, java.util.List), OrderService.getOrders(java.lang.Class, java.util.List, java.util.List, org.openmrs.api.OrderService.ORDER_STATUS, java.util.List, java.util.List, java.util.List)

getOrderByUuid

public Order getOrderByUuid(java.lang.String uuid)
Description copied from interface: OrderDAO
Auto generated method comment

Specified by:
getOrderByUuid in interface OrderDAO
Returns:
See Also:
OrderDAO.getOrderByUuid(java.lang.String)

getOrderTypeByUuid

public OrderType getOrderTypeByUuid(java.lang.String uuid)
Description copied from interface: OrderDAO
Auto generated method comment

Specified by:
getOrderTypeByUuid in interface OrderDAO
Returns:
See Also:
OrderDAO.getOrderTypeByUuid(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