public class HibernateTemplateDAO extends 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(Integer id)
Get message template by id
|
List<Template> |
getTemplates()
Get all message templates
|
List<Template> |
getTemplatesByName(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 List<Template> getTemplates()
TemplateDAO
getTemplates
in interface TemplateDAO
public Template getTemplate(Integer id)
TemplateDAO
getTemplate
in interface TemplateDAO
id
- internal message template identifierpublic List<Template> getTemplatesByName(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 © 2024 OpenMRS Inc.. All rights reserved.