@Override
  public int hashCode() {
    // use the unique ID if it exists
    if( null != alertId ){
      return alertId.hashCode();
    }

    return Objects.hash(alertId, clusterId, alertInstance, alertLabel, alertState, alertText,
        alertTimestamp, serviceName, componentName, hostName, alertDefinition);
  }
Gets a hash to uniquely identify this historical alert instance. Since historical entries
have no real uniqueness properties, we need to rely on a combination of the fields of this
entity.
<p/>
However, since we're guaranteed that {@link #alertId} is unique among persisted entities, we
can return the hashCode based on this value if it is set.
<p/>
{@inheritDoc}
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java