Interface ReferenceResolver

All Known Subinterfaces:
DbRefResolver
All Known Implementing Classes:
DefaultDbRefResolver, DefaultReferenceResolver, NoOpDbRefResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ReferenceResolver
The ReferenceResolver allows to load and convert linked entities.
Since:
3.3
Author:
Christoph Strobl
  • Method Details

    • resolveReference

      @Nullable Object resolveReference(MongoPersistentProperty property, Object source, ReferenceLookupDelegate referenceLookupDelegate, ReferenceResolver.MongoEntityReader entityReader)
      Resolve the association defined via the given property from a given source value. May return a proxy instance in case of a lazy loading association. The resolved value is assignable to PersistentProperty.getType().
      Parameters:
      property - the association defining property.
      source - the association source value.
      referenceLookupDelegate - the lookup executing component.
      entityReader - conversion function capable of constructing entities from raw source.
      Returns:
      can be null.