@RequiresSession
  public List<ConfigGroupEntity> findAllByTag(String tag) {
    TypedQuery<ConfigGroupEntity> query = entityManagerProvider.get()
      .createNamedQuery("configGroupsByTag", ConfigGroupEntity.class);
    query.setParameter("tagName", tag);
    try {
      return query.getResultList();
    } catch (NoResultException ignored) {
    }
    return null;
  }
Find config groups by service name and so on
@param tag
@return
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ConfigGroupDAO.java