GrouperLog.debug(LOG, s, MSG_FIMSHIPSO_PRO + " filtered: " + mships.size());
  protected static Set findImmediateMemberships(    GrouperSession s, Owner o, Field f  )  {    /*     * @caller    public    Group.getImmediateMemberships(f)     * @caller    protected Membership.deleteAllField(s, ns, f)     * @caller    protected MembershipFinder.findImmediateMembers(s, g, field)     * @filtered  true     * @session   true     */    GrouperSession.validate(s);    GrouperLog.debug(LOG, s, MSG_FIMSHIPSO_PRO);    Set mships  = new LinkedHashSet();    try {      Session hs  = HibernateHelper.getSession();      Query   qry = hs.createQuery(        "from Membership as ms where    "        + "     ms.owner_id   = :owner  "        + "and  ms.field.name = :fname  "        + "and  ms.field.type = :ftype  "        + "and  ms.depth      = 0"      );      qry.setCacheable(GrouperConfig.QRY_MSF_FIMO);      qry.setCacheRegion(GrouperConfig.QCR_MSF_FIMO);      qry.setParameter( "owner" , o                     );      qry.setString(    "fname" , f.getName()           );      qry.setString(    "ftype" , f.getType().toString());      List    l   = qry.list();      hs.close();      GrouperLog.debug(LOG, s, MSG_FIMSHIPSO_PRO + " unfiltered: " + l.size());      mships.addAll( _filterMemberships(s, f, l) );    }    catch (HibernateException eH) {      GrouperLog.error(LOG, s, MSG_FIMSHIPSO_PRO + ": " + eH.getMessage());    }    GrouperLog.debug(LOG, s, MSG_FIMSHIPSO_PRO + " filtered: " + mships.size());    return mships;  } // protected static Set findImmediateMemberships(s, o, f)