@RequiresSession
  public ConfigGroupEntity findByName(String groupName) {
    TypedQuery<ConfigGroupEntity> query = entityManagerProvider.get()
      .createNamedQuery("configGroupByName", ConfigGroupEntity.class);
    query.setParameter("groupName", groupName);
    try {
      return query.getSingleResult();
    } catch (NoResultException ignored) {
      return null;
    }
  }
Find config group by its unique name
@param groupName
@return ConfigGroupEntity
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ConfigGroupDAO.java