Class MappingMongoConverter.DefaultConversionContext

java.lang.Object
org.springframework.data.mongodb.core.convert.MappingMongoConverter.DefaultConversionContext
Enclosing class:
MappingMongoConverter

protected static class MappingMongoConverter.DefaultConversionContext extends Object
Conversion context holding references to simple MappingMongoConverter.DefaultConversionContext.ValueConverter and MappingMongoConverter.DefaultConversionContext.ContainerValueConverter. Entrypoint for recursive conversion of Document and other types.
Since:
3.2
  • Method Details

    • convert

      public <S> S convert(Object source, TypeInformation<? extends S> typeHint, org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext context)
    • getCustomConversions

      public CustomConversions getCustomConversions()
    • getSourceConverter

      public MongoConverter getSourceConverter()
    • withPath

      public org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext withPath(org.springframework.data.mongodb.core.convert.ObjectPath currentPath)
    • getPath

      public org.springframework.data.mongodb.core.convert.ObjectPath getPath()
    • convert

      default <S> S convert(Object source, TypeInformation<? extends S> typeHint)
      Converts a source object into target.
      Parameters:
      source - must not be null.
      typeHint - must not be null.
      Returns:
      the converted object.
    • forProperty

      default org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext forProperty(String name)
      Obtain a MappingMongoConverter.ConversionContext for the given property name.
      Parameters:
      name - must not be null.
      Returns:
      the MappingMongoConverter.ConversionContext to be used for conversion of the given property.
    • forProperty

      default org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext forProperty(MongoPersistentProperty property)
      Obtain a MappingMongoConverter.ConversionContext for the given MongoPersistentProperty.
      Parameters:
      property - must not be null.
      Returns:
      the MappingMongoConverter.ConversionContext to be used for conversion of the given property.
    • findContextualEntity

      @Nullable default <S> S findContextualEntity(MongoPersistentEntity<S> entity, org.bson.Document document)
      Lookup a potentially existing entity instance of the given MongoPersistentEntity and Document
      Type Parameters:
      S -
      Parameters:
      entity -
      document -
      Returns: