コード例 #1
0
 public Integer add(String host, String username, String password) {
   MailAccount account = new MailAccount();
   account.setHost(host);
   account.setUsername(username);
   account.setPassword(password);
   return HibernateUtils.save(account);
 }
コード例 #2
0
 public void update(Integer id, String host, String password) {
   MailAccount account = getInstance(id);
   if (account != null) {
     account.setHost(host);
     account.setPassword(password);
     HibernateUtils.update(account);
   }
 }