Module spring.data.mongodb
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> Sconvert(Object source, TypeInformation<? extends S> typeHint, MappingMongoConverter.ConversionContext context) Converts a source object intotarget.org.springframework.data.mongodb.core.convert.ObjectPathgetPath()withPath(org.springframework.data.mongodb.core.convert.ObjectPath currentPath) Create a newMappingMongoConverter.ConversionContextwithcurrentPathapplied.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.ConversionContextConverts a source object intotarget.- Specified by:
convertin 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:
getCustomConversionsin interfaceMappingMongoConverter.ConversionContext
-
getSourceConverter
- Specified by:
getSourceConverterin interfaceMappingMongoConverter.ConversionContext
-
withPath
public MappingMongoConverter.ConversionContext withPath(org.springframework.data.mongodb.core.convert.ObjectPath currentPath) Description copied from interface:MappingMongoConverter.ConversionContextCreate a newMappingMongoConverter.ConversionContextwithcurrentPathapplied.- Specified by:
withPathin interfaceMappingMongoConverter.ConversionContext- Parameters:
currentPath- must not be null.- Returns:
- a new
MappingMongoConverter.ConversionContextwithcurrentPathapplied.
-
getPath
public org.springframework.data.mongodb.core.convert.ObjectPath getPath()- Specified by:
getPathin interfaceMappingMongoConverter.ConversionContext
-