@Override
  public int hashCode() {
    int result = groupId != null ? groupId.hashCode() : 0;
    result = 31 * result + (groupName != null ? groupName.hashCode() : 0);
    result = 31 * result + (ldapGroup != null ? ldapGroup.hashCode() : 0);
    return result;
  }
Set the admin principal entity.

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