public boolean deeplyEquals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (obj == null) {
      return false;
    }

    if (getClass() != obj.getClass()) {
      return false;
    }

    AlertDefinition other = (AlertDefinition) obj;
    if (componentName == null) {
      if (other.componentName != null) {
        return false;
      }
    } else if (!componentName.equals(other.componentName)) {
      return false;
    }

    if (enabled != other.enabled) {
      return false;
    }

    if (ignoreHost != other.ignoreHost) {
      return false;
    }

    if (interval != other.interval) {
      return false;
    }

    if (label == null) {
      if (other.label != null) {
        return false;
      }
    } else if (!label.equals(other.label)) {
      return false;
    }

    if (!StringUtils.equals(helpURL, other.helpURL)) {
      return false;
    }

    if (description == null) {
      if (other.description != null) {
        return false;
      }
    } else if (!description.equals(other.description)) {
      return false;
    }

    if (name == null) {
      if (other.name != null) {
        return false;
      }
    } else if (!name.equals(other.name)) {
      return false;
    }

    if (null == scope) {
      scope = Scope.ANY;
    }

    if (scope != other.scope) {
      return false;
    }

    if (serviceName == null) {
      if (other.serviceName != null) {
        return false;
      }
    } else if (!serviceName.equals(other.serviceName)) {
      return false;
    }

    if (source == null) {
      if (other.source != null) {
        return false;
      }
    } else if (!source.equals(other.source)) {
      return false;
    }

    return true;
  }
Compares {@link #equals(Object)} of every field. This is used mainly for
reconciling the stack versus the database.

@param obj
@return
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinition.java