via_txt = " AND gl.via" + GrouperBackend._queryNullOrVal(via);
if        (via.equals(Grouper.MEM_ALL)) {  } else if (via.equals(Grouper.MEM_EFF)) {  via_txt = " AND gl.via IS NOT NULL"; } else if (via.equals(Grouper.MEM_IMM)) {  via_txt = " AND gl.via IS NULL"; } else { via_txt = " AND gl.via" + GrouperBackend._queryNullOrVal(via); }
  private static List _queryGrouperList(                                        Session session, String gkey,                                        String  mkey,    String gfield,                                        String  via                                       )  {    List    vals        = new ArrayList();    String  gfield_txt  = GrouperBackend._queryNullOrVal(gfield);    String  gkey_txt    = GrouperBackend._queryNullOrVal(gkey);    String  mkey_txt    = GrouperBackend._queryNullOrVal(mkey);    String  via_txt     = "";    if (via != null) {      via_txt = " AND gl.via" + GrouperBackend._queryNullOrVal(via);    }    try {      Query q = session.createQuery(        "FROM GrouperList AS gl"      +        " WHERE "                     +        "gl.groupKey"   + gkey_txt    +        " AND "                       +        "gl.memberKey"  + mkey_txt    +        " AND "                       +        "gl.groupField" + gfield_txt  +        via_txt      );      Grouper.log().query("_queryGrouperList", q);      vals = q.list();    } catch (HibernateException e) {      System.err.println(e);      System.exit(1);    }    return vals;  }