protected static class MappingMongoConverter.DefaultConversionContext extends Object
ValueConverter
and ContainerValueConverter
.
Entrypoint for recursive conversion of Document
and other types.Modifier and Type | Method and Description |
---|---|
default <S> S |
convert(Object source,
TypeInformation<? extends S> typeHint)
Converts a source object into
target . |
<S> S |
convert(Object source,
TypeInformation<? extends S> typeHint,
org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext context)
Converts a source object into
target . |
default <S> S |
findContextualEntity(MongoPersistentEntity<S> entity,
org.bson.Document document)
Lookup a potentially existing entity instance of the given
MongoPersistentEntity and Document |
default org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext |
forProperty(MongoPersistentProperty property)
Obtain a
ConversionContext for the given MongoPersistentProperty . |
default org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext |
forProperty(String name)
Obtain a
ConversionContext for the given property name . |
CustomConversions |
getCustomConversions() |
org.springframework.data.mongodb.core.convert.ObjectPath |
getPath() |
MongoConverter |
getSourceConverter() |
org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext |
withPath(org.springframework.data.mongodb.core.convert.ObjectPath currentPath)
Create a new
ConversionContext with currentPath applied. |
public <S> S convert(Object source, TypeInformation<? extends S> typeHint, org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext context)
target
.source
- must not be null.typeHint
- must not be null.context
- must not be null.public CustomConversions getCustomConversions()
public MongoConverter getSourceConverter()
public org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext withPath(org.springframework.data.mongodb.core.convert.ObjectPath currentPath)
ConversionContext
with currentPath
applied.currentPath
- must not be null.ConversionContext
with currentPath
applied.public org.springframework.data.mongodb.core.convert.ObjectPath getPath()
public <S> S convert(Object source, TypeInformation<? extends S> typeHint)
target
.source
- must not be null.typeHint
- must not be null.public org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext forProperty(String name)
ConversionContext
for the given property name
.name
- must not be null.ConversionContext
to be used for conversion of the given property.public org.springframework.data.mongodb.core.convert.MappingMongoConverter.ConversionContext forProperty(MongoPersistentProperty property)
ConversionContext
for the given MongoPersistentProperty
.property
- must not be null.ConversionContext
to be used for conversion of the given property.@Nullable public <S> S findContextualEntity(MongoPersistentEntity<S> entity, org.bson.Document document)
MongoPersistentEntity
and Document
S
- entity
- document
- Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.