public FetchConfiguration removeFetchGroup(String group) { lock(); try { if (_state.fetchGroups != null) { _state.fetchGroups.remove(group); if (FetchGroup.NAME_ALL.equals(group)) _state.fetchGroupContainsAll = false; else if (FetchGroup.NAME_DEFAULT.equals(group)) _state.fetchGroupContainsDefault = false; } } finally { unlock(); } return this; }
public FetchConfiguration addFetchGroup(String name) { if (StringUtils.isEmpty(name)) throw new UserException(_loc.get("null-fg")); lock(); try { if (_state.fetchGroups == null) _state.fetchGroups = new HashSet<String>(); _state.fetchGroups.add(name); if (FetchGroup.NAME_ALL.equals(name)) _state.fetchGroupContainsAll = true; else if (FetchGroup.NAME_DEFAULT.equals(name)) _state.fetchGroupContainsDefault = true; } finally { unlock(); } return this; }