@RequiresSession
  private AlertCurrentEntity findCurrentByNameNoHostInternalInJPA(long clusterId, String alertName) {
    TypedQuery<AlertCurrentEntity> query = m_entityManagerProvider.get().createNamedQuery(
        "AlertCurrentEntity.findByNameAndNoHost", AlertCurrentEntity.class);

    query.setParameter("clusterId", Long.valueOf(clusterId));
    query.setParameter("definitionName", alertName);

    return m_daoUtils.selectOne(query);
  }
Locate the current alert for the provided service and alert name, but when
host is not set ({@code IS NULL}). This method

@param clusterId
         the cluster id
@param alertName
         the name of the alert
@return the current record, or {@code null} if not found
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java