public Set<AlertGroupEntity> getAlertGroups() {
    if (null == alertGroups) {
      return Collections.emptySet();
    }

    return ImmutableSet.copyOf(alertGroups);
  }
Gets an immutable set of the alert groups that this target is associated
with.

@return the groups that will send to this target when an alert in that
        group is received, or an empty set for none.
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java