@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ViewResourceEntityPK that = (ViewResourceEntityPK) o;

    return this.viewName.equals(that.viewName) &&
        this.name.equals(that.name);
  }
Set the name of the resource.

@param name  resource name
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewResourceEntityPK.java