@RequiresSession
  public List<AlertDefinitionEntity> findByServiceComponent(long clusterId,
      String serviceName, String componentName) {
    if (null == serviceName || null == componentName) {
      return Collections.emptyList();
    }

    TypedQuery<AlertDefinitionEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertDefinitionEntity.findByServiceAndComponent",
        AlertDefinitionEntity.class);

    query.setParameter("clusterId", clusterId);
    query.setParameter("serviceName", serviceName);
    query.setParameter("componentName", componentName);

    return daoUtils.selectList(query);
  }
Gets all alert definitions that are not bound to a particular service. An
example of this type of definition is a host capacity alert.

@param clusterId
         the ID of the cluster.
@param serviceName
         the name of the service (not {@code null}).
@param componentName
         the name of the service component (not {@code null}).
@return all alert definitions that are not bound to a service or an empty
        list (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java