コード例 #1
0
 /**
  * Delete all templates in the Database Only used in unit tests so not in API TODO rewrite for
  * efficiency
  */
 public void deleteAllTemplates() {
   log.debug("deleteAllTemplates");
   List<EmailTemplate> templates = dao.findAll(EmailTemplate.class);
   for (int i = 0; i < templates.size(); i++) {
     EmailTemplate template = templates.get(i);
     log.debug("deleting template: " + template.getId());
     dao.delete(template);
   }
 }
コード例 #2
0
 public List<EmailTemplate> getEmailTemplates(int max, int start) {
   return dao.findAll(EmailTemplate.class, start, max);
 }