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