org.openmrs.api.db.hibernate
Class HibernateTemplateDAO

java.lang.Object
  extended by org.openmrs.api.db.hibernate.HibernateTemplateDAO
All Implemented Interfaces:
TemplateDAO

public class HibernateTemplateDAO
extends java.lang.Object
implements TemplateDAO


Constructor Summary
HibernateTemplateDAO()
           
 
Method Summary
 void createTemplate(Template template)
          Create new template.
 void deleteTemplate(Template template)
          Delete existing template.
 Template getTemplate(java.lang.Integer id)
          Get message template by id
 java.util.List<Template> getTemplates()
          Get all message templates
 java.util.List<Template> getTemplatesByName(java.lang.String name)
          Get message template by name
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set session factory
 void updateTemplate(Template template)
          Update existing template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateTemplateDAO

public HibernateTemplateDAO()
Method Detail

setSessionFactory

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

Parameters:
sessionFactory -

getTemplates

public java.util.List<Template> getTemplates()
Description copied from interface: TemplateDAO
Get all message templates

Specified by:
getTemplates in interface TemplateDAO

getTemplate

public Template getTemplate(java.lang.Integer id)
Description copied from interface: TemplateDAO
Get message template by id

Specified by:
getTemplate in interface TemplateDAO
Parameters:
id - internal message template identifier
Returns:
message template with given internal identifier

getTemplatesByName

public java.util.List<Template> getTemplatesByName(java.lang.String name)
Description copied from interface: TemplateDAO
Get message template by name

Specified by:
getTemplatesByName in interface TemplateDAO
Parameters:
name - message template name
Returns:
message template with given name

createTemplate

public void createTemplate(Template template)
                    throws DAOException
Description copied from interface: TemplateDAO
Create new template.

Specified by:
createTemplate in interface TemplateDAO
Throws:
DAOException

updateTemplate

public void updateTemplate(Template template)
                    throws DAOException
Description copied from interface: TemplateDAO
Update existing template.

Specified by:
updateTemplate in interface TemplateDAO
Throws:
DAOException

deleteTemplate

public void deleteTemplate(Template template)
                    throws DAOException
Description copied from interface: TemplateDAO
Delete existing template.

Specified by:
deleteTemplate in interface TemplateDAO
Throws:
DAOException

OpenMRS-1.7.x

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