@RequiresSession
  public List<AlertDefinitionEntity> findAll(long clusterId) {
    TypedQuery<AlertDefinitionEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertDefinitionEntity.findAllInCluster", AlertDefinitionEntity.class);

    query.setParameter("clusterId", clusterId);

    return daoUtils.selectList(query);
  }
Gets all alert definitions stored in the database.

@return all alert definitions or empty list if none exist (never
        {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java