public Set<User> getUsersSelecting(AGwtEntity entity) { Set<User> users = new HashSet<User>(); for (ProjectUserConfig config : getUserConfigs()) { if (config.getSelectedEntitysIds().contains(entity.getId())) users.add(config.getUser()); } return users; }
public int getTotalMisconducts() { int sum = 0; for (ProjectUserConfig config : getProjectUserConfigs()) { sum += config.getMisconducts(); } return sum; }
public ProjectUserConfig getUserConfig(User user) { for (ProjectUserConfig config : getDao().getProjectUserConfigsByProject(this)) { if (config.isUser(user)) return config; } return null; }