@Override
  public int hashCode() {
    int result = id != null ? id.hashCode() : 0;
    result = 31 * result + viewName.hashCode();
    result = 31 * result + viewInstanceName.hashCode();
    result = 31 * result + className.hashCode();
    result = 31 * result + (idProperty != null ? idProperty.hashCode() : 0);
    return result;
  }
Set the id property.

@param idProperty  the id property
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java