class HibernateMessageTemplateDAO extends HibernatePersistentObjectDAO<MessageTemplate> implements MessageTemplateDAO {

	@Override
	public List<MessageTemplate> findByName(String name, long tenantId) {
		try {
			return findByWhere(" _entity.name='" + SqlUtil.doubleQuotes(name) + "' and _entity.tenantId=" + tenantId,
					null, null);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
			return new ArrayList<MessageTemplate>();
		}
	}

	public  HibernateMessageTemplateDAO();

}