Class MongoCustomConversions
java.lang.Object
org.springframework.data.convert.CustomConversions
org.springframework.data.mongodb.core.convert.MongoCustomConversions
Value object to capture custom conversion.
MongoCustomConversions also act as factory for
SimpleTypeHolder- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStrategy to representBigDecimalandBigIntegervalues in MongoDB.static classMongoCustomConversions.MongoConverterConfigurationAdapterencapsulates creation ofCustomConversions.ConverterConfigurationwith MongoDB specifics.Nested classes/interfaces inherited from class CustomConversions
CustomConversions.ConverterConfiguration, CustomConversions.ConverterRegistrationIntent, CustomConversions.StoreConversions -
Constructor Summary
ConstructorsModifierConstructorDescriptionMongoCustomConversions(List<?> converters) Create a newMongoCustomConversionsinstance registering the given converters.protectedMongoCustomConversions(MongoCustomConversions.MongoConverterConfigurationAdapter conversionConfiguration) Create a newMongoCustomConversionsgivenMongoCustomConversions.MongoConverterConfigurationAdapter. -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoCustomConversionsFunctional styleCustomConversionscreation giving users a convenient way of configuring store specific capabilities by providing deferred hooks to what will be configured when creating theinstance.voidregisterConvertersIn(ConverterRegistry conversionService)
-
Constructor Details
-
MongoCustomConversions
Create a newMongoCustomConversionsinstance registering the given converters.- Parameters:
converters- must not be null.
-
MongoCustomConversions
protected MongoCustomConversions(MongoCustomConversions.MongoConverterConfigurationAdapter conversionConfiguration) Create a newMongoCustomConversionsgivenMongoCustomConversions.MongoConverterConfigurationAdapter.- Parameters:
conversionConfiguration- must not be null.- Since:
- 2.3
-
-
Method Details
-
create
public static MongoCustomConversions create(Consumer<MongoCustomConversions.MongoConverterConfigurationAdapter> configurer) Functional styleCustomConversionscreation giving users a convenient way of configuring store specific capabilities by providing deferred hooks to what will be configured when creating theinstance.- Parameters:
configurer- must not be null.- Since:
- 2.3
-
registerConvertersIn
- Overrides:
registerConvertersInin classCustomConversions
-