mships.addAll(Membership.setSession(s, l));
mships = _filterMemberships(s, g, f, l, msg);
  protected static Set findMemberships(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  = ?     ",                      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 e) {      // TODO Is a RE appropriate here?      throw new RuntimeException(        "error checking membership: " + e.getMessage()      );      }    return mships;  } // protected static Set findMemberships(s, g, f)