public void addAlertDefinition(AlertDefinitionEntity definition) {
    if (null == alertDefinitions) {
      alertDefinitions = new HashSet<>();
    }

    alertDefinitions.add(definition);
    definition.addAlertGroup(this);
  }
Adds the specified definition to the definitions that this group will
dispatch to.

@param definition
         the definition to add (not {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java