org.springframework.data.mongodb.core.convert
Class AbstractMongoConverter
java.lang.Object
org.springframework.data.mongodb.core.convert.AbstractMongoConverter
- All Implemented Interfaces:
- InitializingBean, MongoConverter, MongoReader<Object>, MongoWriter<Object>
- Direct Known Subclasses:
- MappingMongoConverter
public abstract class AbstractMongoConverter
- extends Object
- implements MongoConverter, InitializingBean
Base class for MongoConverter
implementations. Sets up a GenericConversionService
and populates basic
converters. Allows registering CustomConversions
.
- Author:
- Jon Brisbin , Oliver Gierke [email protected]
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.MongoReader |
read |
conversionService
protected final GenericConversionService conversionService
conversions
protected CustomConversions conversions
AbstractMongoConverter
public AbstractMongoConverter(GenericConversionService conversionService)
- Creates a new
AbstractMongoConverter
using the given GenericConversionService
.
- Parameters:
conversionService
-
setCustomConversions
public void setCustomConversions(CustomConversions conversions)
- Registers the given custom conversions with the converter.
- Parameters:
conversions
-
getConversionService
public ConversionService getConversionService()
- Description copied from interface:
MongoConverter
- Returns the underlying
ConversionService
used by the converter.
- Specified by:
getConversionService
in interface MongoConverter
- Returns:
- never null.
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface InitializingBean
Copyright © 2011. All Rights Reserved.