public void setAuthenticationEntities(List<UserAuthenticationEntity> authenticationEntities) {
    // If the passed in value is not the same list that is stored internally, clear it and set the
    // entries to the same set that the user passed in.
    // If the passed in value is the same list, then do nothing since the internal value is already
    // set.
    if (this.authenticationEntities != authenticationEntities) {  // Tests to see if the Lists are the same object, not if they have the same content.
      this.authenticationEntities.clear();

      if (authenticationEntities != null) {
        this.authenticationEntities.addAll(authenticationEntities);
      }
    }
  }
Set the admin principal entity.

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