コード例 #1
0
 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;
 }
コード例 #2
0
  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;
  }