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

    GroupEntity that = (GroupEntity) o;

    if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
    if (groupName != null ? !groupName.equals(that.groupName) : that.groupName != null) return false;
    if (ldapGroup != null ? !ldapGroup.equals(that.ldapGroup) : that.ldapGroup != null) return false;

    return true;
  }
Set the admin principal entity.

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