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

    PrincipalEntity that = (PrincipalEntity) o;

    return id.equals(that.id) && !(principalType != null ?
        !principalType.equals(that.principalType) : that.principalType != null);
  }
Remove a privilege.

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