@Override public Set<User> getUserSet(String users) { Set<User> tagSet = new HashSet<User>(); String[] userNameArr = users.split(","); for (int i = 0; i < userNameArr.length; i++) { User u = userDao.getUserByName(userNameArr[i]); if (u != null) tagSet.add(u); } return tagSet; }
public User getUserByName(String username) { return userDao.getUserByName(username); }
public void blockUser(String username) { User user = userDao.getUserByName(username); user.setEnabled(!user.isEnabled()); userDao.save(user); }