コード例 #1
0
 public void updateUser(User user, String newPassword) {
   User find = userFacade.find(user.getId());
   find.setUsername(user.getUsername());
   find.setEmail(user.getEmail());
   if (!newPassword.equals("")) {
     find.setPassword(newPassword);
   }
 }
コード例 #2
0
 public void deleteUser(long id) {
   User user = userFacade.find(id);
   if (user != null) {
     userFacade.remove(user);
   }
 }