class AlertDefinitionDAO {

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

    query.setParameter("clusterId", clusterId);

    query.setParameter("serviceName",
        RootService.AMBARI.name());

    query.setParameter("componentName",
        RootComponent.AMBARI_AGENT.name());

    return daoUtils.selectList(query);
  }

}