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

    PrincipalTypeEntity that = (PrincipalTypeEntity) o;

    if (!id.equals(that.id)) return false;
    if (name != null ? !name.equals(that.name) : that.name != null) return false;

    return true;
  }
Set the principal type name.

@param name  the principal type name.
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java