String msg = "delImmediateMembership '" + f + "'"; GrouperLog.debug(LOG, s, msg); try {  Set     deletes = new LinkedHashSet(); Set     saves   = new LinkedHashSet();  Member  m       = PrivilegeResolver.getInstance().canViewSubject( s, subj, msg );  g.setModified(); saves.add(g);   Membership imm = MembershipFinder.findImmediateMembership(s, g, subj, f); TxQueue     tx  = new TxMemberDel(s, g.getUuid(), m, f); saves.add(tx);  Set effs = _membershipsToDelete(s, imm); deletes.addAll(effs);  deletes.add(imm);   HibernateHelper.saveAndDelete(saves, deletes);  EL.delEffMembers(s, g, subj, f, effs);  } catch (HibernateException eH) { msg += ": " + eH.getMessage(); GrouperLog.debug(LOG, s, msg); throw new MemberDeleteException(msg); } catch (MemberNotFoundException eMNF) { msg += ": " + eMNF.getMessage(); GrouperLog.debug(LOG, s, msg); throw new MemberDeleteException(msg); }
g.setModified(); _delImmediateMembership(s, g, g.getUuid(), subj, f);
  protected static void delImmediateMembership(    GrouperSession s, Group g, Subject subj, Field f  )    throws  InsufficientPrivilegeException,            MemberDeleteException,            MembershipNotFoundException,            SchemaException  {    GrouperSession.validate(s);    String msg = "delImmediateMembership '" + f + "'";    GrouperLog.debug(LOG, s, msg);    try {      // The objects that will need deleting and saving      Set     deletes = new LinkedHashSet();      Set     saves   = new LinkedHashSet();      // Who we're deleting      Member  m       = PrivilegeResolver.getInstance().canViewSubject(        s, subj, msg      );      g.setModified();      saves.add(g);      // Find memberships to delete      Membership imm = MembershipFinder.findImmediateMembership(s, g, subj, f);      TxQueue     tx  = new TxMemberDel(s, g.getUuid(), m, f);      saves.add(tx);      Set effs = _membershipsToDelete(s, imm);      deletes.addAll(effs);      deletes.add(imm);      // And then commit changes to registry      HibernateHelper.saveAndDelete(saves, deletes);      EL.delEffMembers(s, g, subj, f, effs);    }    catch (HibernateException eH) {      msg += ": " + eH.getMessage();      GrouperLog.debug(LOG, s, msg);      throw new MemberDeleteException(msg);    }    catch (MemberNotFoundException eMNF) {      msg += ": " + eMNF.getMessage();      GrouperLog.debug(LOG, s, msg);      throw new MemberDeleteException(msg);    }  } // protected static void delImmediateMembership(s, g, subj, f)