@RequiresSession
  public AlertGroupEntity findDefaultServiceGroup(long clusterId,
      String serviceName) {
    TypedQuery<AlertGroupEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertGroupEntity.findServiceDefaultGroup", AlertGroupEntity.class);

    query.setParameter("clusterId", clusterId);
    query.setParameter("serviceName", serviceName);
    return daoUtils.selectSingle(query);
  }
Gets the default group for the specified cluster and service.

@param clusterId
         the cluster that the group belongs to
@param serviceName
         the name of the service (not {@code null}).
@return the default group, or {@code null} if the service name is not valid
        for an installed service; otherwise {@code null} should not be
        possible.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java