public class HibernateTemplateDAO extends java.lang.Object implements TemplateDAO
Constructor and Description |
---|
HibernateTemplateDAO() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public java.util.List<Template> getTemplates()
TemplateDAO
getTemplates
in interface TemplateDAO
public Template getTemplate(java.lang.Integer id)
TemplateDAO
getTemplate
in interface TemplateDAO
id
- internal message template identifierpublic java.util.List<Template> getTemplatesByName(java.lang.String name)
TemplateDAO
getTemplatesByName
in interface TemplateDAO
name
- message template namepublic void createTemplate(Template template) throws DAOException
TemplateDAO
createTemplate
in interface TemplateDAO
DAOException
public void updateTemplate(Template template) throws DAOException
TemplateDAO
updateTemplate
in interface TemplateDAO
DAOException
public void deleteTemplate(Template template) throws DAOException
TemplateDAO
deleteTemplate
in interface TemplateDAO
DAOException
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.