Class ReferenceLookupDelegate

java.lang.Object
org.springframework.data.mongodb.core.convert.ReferenceLookupDelegate

public final class ReferenceLookupDelegate extends Object
A common delegate for ReferenceResolver implementations to resolve a reference to one/many target documents that are converted to entities.
Since:
3.3
Author:
Christoph Strobl, Mark Paluch
  • Constructor Details

  • Method Details

    • readReference

      @Nullable public Object readReference(MongoPersistentProperty property, Object source, org.springframework.data.mongodb.core.convert.ReferenceLookupDelegate.LookupFunction lookupFunction, ReferenceResolver.MongoEntityReader entityReader)
      Read the reference expressed by the given property.
      Parameters:
      property - the reference defining property. Must not be null. THe
      source - the source value identifying to the referenced entity. Must not be null.
      lookupFunction - to execute a lookup query. Must not be null.
      entityReader - the callback to convert raw source values into actual domain types. Must not be null.
      Returns:
      can be null.