SchemaException,
  protected static Set deleteAllField(GrouperSession s, Group g, Field f)     throws  GroupNotFoundException,            MemberDeleteException,            MemberNotFoundException,            SubjectNotFoundException  {    GrouperSession.validate(s);    String msg = "deleteAllField '" + f + "'";    GrouperLog.debug(LOG, s, msg);    GrouperSession orig = s;    GrouperSession root = GrouperSessionFinder.getRootSession();    g.setSession(root);    Set deletes = new LinkedHashSet();    // Remove where this group is an immediate member    GrouperLog.debug(LOG, s, msg + " finding isMember");    Iterator iterIS = g.toMember().getImmediateMemberships(f).iterator();    while (iterIS.hasNext()) {      Membership  msIS  = (Membership) iterIS.next();      Set         effs  = _membershipsToDelete(        s, msIS.getGroup(), msIS.getMember().getSubject(), msIS.getList()      );      GrouperLog.debug(        LOG, orig, msg + " found isMember: " + effs.size()      );      deletes.addAll(effs);    }    // ... and then deal with this group's immediate members    GrouperLog.debug(LOG, s, msg + " finding hasMembers");    Iterator iterHAS = g.getImmediateMemberships(f).iterator();    while (iterHAS.hasNext()) {      Membership  msHAS = (Membership) iterHAS.next();      Set         effs  = _membershipsToDelete(        s, msHAS.getGroup(), msHAS.getMember().getSubject(), msHAS.getList()      );      GrouperLog.debug(        LOG, orig, msg + " found hasMembers: " + effs.size()      );      deletes.addAll(effs);    }    g.setSession(orig);    GrouperLog.debug(LOG, orig, msg + " total: " + deletes.size());    return deletes;  } // protected static Set deleteAllField(s, g, f)