public void setAlertDefinitions(Set<AlertDefinitionEntity> alertDefinitions) {
    if (null != this.alertDefinitions) {
      for (AlertDefinitionEntity definition : this.alertDefinitions) {
        definition.removeAlertGroup(this);
      }
    }

    this.alertDefinitions = alertDefinitions;

    if (null != alertDefinitions) {
      for (AlertDefinitionEntity definition : alertDefinitions) {
        definition.addAlertGroup(this);
      }
    }
  }
Set all of the alert definitions that are part of this alert group.

@param alertDefinitions
         the definitions, or {@code null} for none.
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java