Set mships = new LinkedHashSet();
Set     mships  = new LinkedHashSet(); String  msg     = "group hasImmediateMemberships '" + g.getName() + "'/'" + f.getName() + "'";
  protected static Set findImmediateMemberships(    GrouperSession s, Group g, Field f  )  {    // TODO Switch to criteria queries?    Set mships = new LinkedHashSet();    try {      Session hs  = HibernateHelper.getSession();      List    l   = hs.find(                      "from Membership as ms where  "                      + "ms.owner_id    = ?         "                      + "and ms.field.name  = ?     "                      + "and ms.field.type  = ?     "                      + "and ms.depth   = 0         ",                         new Object[] {                        g.getUuid(),                         f.getName(),                         f.getType().toString()                      },                      new Type[] {                        Hibernate.STRING,                         Hibernate.STRING,                        Hibernate.STRING                      }                    )                    ;      hs.close();      mships.addAll(Membership.setSession(s, l));    }    catch (HibernateException eH) {      // TODO Is a RE appropriate here?      throw new RuntimeException(        "error finding immediate memberships: " + eH.getMessage()      );      }    return mships;  } // protected static Set findImmediateMemberships(s, g, field)