public abstract class AbstractMongoConverter extends Object implements MongoConverter, InitializingBean
MongoConverter implementations. Sets up a GenericConversionService and populates basic
converters. Allows registering CustomConversions.| Modifier and Type | Field and Description |
|---|---|
protected CustomConversions |
conversions |
protected GenericConversionService |
conversionService |
protected EntityInstantiators |
instantiators |
| Constructor and Description |
|---|
AbstractMongoConverter(GenericConversionService conversionService)
Creates a new
AbstractMongoConverter using the given GenericConversionService. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
ConversionService |
getConversionService() |
void |
setCustomConversions(CustomConversions conversions)
Registers the given custom conversions with the converter.
|
void |
setInstantiators(EntityInstantiators instantiators)
Registers
EntityInstantiators to customize entity instantiation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertId, getTypeMapper, mapValueToTargetTypegetMappingContextreadconvertToMongoType, convertToMongoType, convertToMongoType, toDBRefwriteprotected final GenericConversionService conversionService
protected CustomConversions conversions
protected EntityInstantiators instantiators
public AbstractMongoConverter(@Nullable GenericConversionService conversionService)
AbstractMongoConverter using the given GenericConversionService.conversionService - can be null and defaults to DefaultConversionService.public void setCustomConversions(CustomConversions conversions)
conversions - must not be null.public void setInstantiators(@Nullable EntityInstantiators instantiators)
EntityInstantiators to customize entity instantiation.instantiators - can be null. Uses default EntityInstantiators if so.public ConversionService getConversionService()
getConversionService in interface EntityConverter<MongoPersistentEntity<?>,MongoPersistentProperty,Object,org.bson.conversions.Bson>public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.