Class MappingMongoConverter.DefaultConversionContext
java.lang.Object
org.springframework.data.mongodb.core.convert.MappingMongoConverter.DefaultConversionContext
- All Implemented Interfaces:
MappingMongoConverter.ConversionContext
- Enclosing class:
- MappingMongoConverter
protected static class MappingMongoConverter.DefaultConversionContext
extends Object
implements MappingMongoConverter.ConversionContext
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 Summary
Modifier and TypeMethodDescription<S> S
convert
(Object source, TypeInformation<? extends S> typeHint, MappingMongoConverter.ConversionContext context) Converts a source object intotarget
.getPath()
withPath
(ObjectPath currentPath) Create a newMappingMongoConverter.ConversionContext
withcurrentPath
applied.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext
convert, findContextualEntity, forProperty, forProperty
-
Method Details
-
convert
public <S> S convert(Object source, TypeInformation<? extends S> typeHint, MappingMongoConverter.ConversionContext context) Description copied from interface:MappingMongoConverter.ConversionContext
Converts a source object intotarget
.- Specified by:
convert
in interfaceMappingMongoConverter.ConversionContext
- Parameters:
source
- must not be null.typeHint
- must not be null.context
- must not be null.- Returns:
- the converted object.
-
getCustomConversions
- Specified by:
getCustomConversions
in interfaceMappingMongoConverter.ConversionContext
-
getSourceConverter
- Specified by:
getSourceConverter
in interfaceMappingMongoConverter.ConversionContext
-
withPath
Description copied from interface:MappingMongoConverter.ConversionContext
Create a newMappingMongoConverter.ConversionContext
withcurrentPath
applied.- Specified by:
withPath
in interfaceMappingMongoConverter.ConversionContext
- Parameters:
currentPath
- must not be null.- Returns:
- a new
MappingMongoConverter.ConversionContext
withcurrentPath
applied.
-
getPath
- Specified by:
getPath
in interfaceMappingMongoConverter.ConversionContext
-