public void save(EmailAccount account) {
   if (account.getId() > -1) {
     emailDAO.edit(account);
   } else {
     emailDAO.save(account);
   }
 }
 public List<EmailAccount> getEmailAccountsByProvider(String provider) {
   return emailDAO.getEmailAccountsByProvider(provider);
 }
  public void delete(int id) {
    EmailAccount account = new EmailAccount();
    account.setId(id);

    emailDAO.delete(account);
  }
 public List<EmailAccount> getEmailAccounts() {
   return emailDAO.getEmailAccounts();
 }