Session       session = GrouperBackend._init(); GrouperGroup  g       = new GrouperGroup();  List vals = GrouperBackend._queryKV( session, "GrouperGroup", "groupID", id ); if (vals.size() == 1) { g = (GrouperGroup) vals.get(0); g = GrouperBackend.groupLoadByKey(g.key()); if (!type.equals(g.type())) { Grouper.log().backend( "Type mismatching when loading by id=" + id ); g = null; } } GrouperBackend._hibernateSessionClose(session);
GrouperGroup g = GrouperBackend._groupLoadByID(id);
  protected static GrouperGroup groupLoadByID(                                  GrouperSession s, String id,                                   String type                                )   {    // FIXME Why don't we call GB._groupLoadByID?    Session       session = GrouperBackend._init();    GrouperGroup  g       = new GrouperGroup();    // First find the key    List vals = GrouperBackend._queryKV(                  session, "GrouperGroup",                  "groupID", id                );    if (vals.size() == 1) {      g = (GrouperGroup) vals.get(0);      g = GrouperBackend.groupLoadByKey(g.key());      if (!type.equals(g.type())) {        Grouper.log().backend(          "Type mismatching when loading by id=" + id        );        g = null;      }    }    GrouperBackend._hibernateSessionClose(session);    return g;  }