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

    return Objects.hash(definitionId, clusterId, definitionName);
  }
Gets a hash to uniquely identify this alert definition. Since we're
guaranteed that {@link #definitionId} 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/AlertDefinitionEntity.java