throw new GroupNotFoundException(E.NO_GROUP_BY_ATTR + eH.getMessage(), eH);
throw new GroupNotFoundException(ERR_FINDBYATTRIBUTE + eH.getMessage(), eH);
  public static Group findByAttribute(GrouperSession s, String attr, String val)    throws  GroupNotFoundException,            IllegalArgumentException  {    Validator.argNotNull( s,    "null session"   );    Validator.argNotNull( attr, "null attribute" );    Validator.argNotNull( val,  "null value"     );    try {      Group   g   = null;      Session hs  = HibernateHelper.getSession();      Query   qry = hs.createQuery(        "from Attribute as a where a.field.name = :field and a.value like :value"      );      qry.setCacheable(true);      qry.setCacheRegion(KLASS + ".FindByAttribute");      qry.setString("field", attr);      qry.setString("value", val);      Attribute a = (Attribute) qry.uniqueResult();      hs.close();      if (a != null) {        g = a.getGroup();        g.setSession(s);        if (s.getMember().canView(g)) {          return g;        }      }    }    catch (HibernateException eH) {      throw new GroupNotFoundException(E.NO_GROUP_BY_ATTR + eH.getMessage(), eH);    }    throw new GroupNotFoundException(E.NO_GROUP_BY_ATTR + U.q(attr));  } // public static Group findByAttribute(s, attr, val)