@Override
  public int hashCode() {
    return Objects.hash(id, permission, resource, principal);
  }
Set the principal entity.

@param principal  the principal entity
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java