);
); Member all = MemberFinder.findAllMember(); l.addAll( hs.find( "from Membership as ms where  " + "ms.member_id       = ?     " + "and ms.field.name  = ?     " + "and ms.field.type  = ?     ", new Object[] { all.getId(), f.getName(), f.getType().toString() }, new Type[] { Hibernate.STRING, Hibernate.STRING, Hibernate.STRING } ) );
  protected static Set findMemberships(    GrouperSession s, Member m, Field f  )  {    /*     * @caller    public GrouperAccessAdapter.getGroupsWhereSubjectHasPriv(s, subj, priv)     * @caller    public GrouperNamingAdapter.getStemsWhereSubjectHasPriv(s, subj, priv)     * @caller    public Member.getMemberships(f)     * @filtered  true     * @session   true     */    GrouperSession.validate(s);    GrouperLog.debug(LOG, s, MSG_FMSHIPSM_PRO);    Set mships  = new LinkedHashSet();    try {      Session hs  = HibernateHelper.getSession();      List    l   = hs.find(        "from Membership as ms where  "        + "ms.member_id       = ?     "        + "and ms.field.name  = ?     "         + "and ms.field.type  = ?     ",        new Object[] {          m.getId(), f.getName(), f.getType().toString()        },        new Type[] {          Hibernate.STRING, Hibernate.STRING, Hibernate.STRING        }        );      hs.close();      GrouperLog.debug(LOG, s, MSG_FMSHIPSM_PRO + " unfiltered: " + l.size());      // TODO If field is a priv switch f to VIEW?      mships.addAll( _filterMemberships(s, f, l) );    }    catch (HibernateException eH) {      GrouperLog.error(LOG, s, MSG_FMSHIPSM_PRO + ": " + eH.getMessage());    }    GrouperLog.debug(LOG, s, MSG_FMSHIPSM_PRO + " filtered: " + mships.size());    return mships;  } // protected static Set findMemberships(s, m, f)