@Override
  public int hashCode() {
    int result = id != null ? id.hashCode() : 0;
    result = 31 * result + (resourceType != null ? resourceType.hashCode() : 0);
    return result;
  }
Set the associated privileges.

@param privileges the privileges
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java