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
Modifier and TypeClassDescriptionstatic class
MongoCustomConversions.MongoConverterConfigurationAdapter
encapsulates creation ofCustomConversions.ConverterConfiguration
with MongoDB specifics.Nested classes/interfaces inherited from class org.springframework.data.convert.CustomConversions
CustomConversions.ConverterConfiguration, CustomConversions.ConverterRegistrationIntent, CustomConversions.StoreConversions
-
Constructor Summary
ModifierConstructorDescriptionMongoCustomConversions
(List<?> converters) Create a newMongoCustomConversions
instance registering the given converters.protected
MongoCustomConversions
(MongoCustomConversions.MongoConverterConfigurationAdapter conversionConfiguration) Create a newMongoCustomConversions
givenMongoCustomConversions.MongoConverterConfigurationAdapter
. -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoCustomConversions
Functional styleCustomConversions
creation giving users a convenient way of configuring store specific capabilities by providing deferred hooks to what will be configured when creating theinstance
.Methods inherited from class org.springframework.data.convert.CustomConversions
getCustomWriteTarget, getCustomWriteTarget, getPropertyValueConversions, getSimpleTypeHolder, hasCustomReadTarget, hasCustomWriteTarget, hasCustomWriteTarget, hasValueConverter, isSimpleType, registerConvertersIn
-
Constructor Details
-
MongoCustomConversions
Create a newMongoCustomConversions
instance registering the given converters.- Parameters:
converters
- must not be null.
-
MongoCustomConversions
protected MongoCustomConversions(MongoCustomConversions.MongoConverterConfigurationAdapter conversionConfiguration) Create a newMongoCustomConversions
givenMongoCustomConversions.MongoConverterConfigurationAdapter
.- Parameters:
conversionConfiguration
- must not be null.- Since:
- 2.3
-
-
Method Details
-
create
public static MongoCustomConversions create(Consumer<MongoCustomConversions.MongoConverterConfigurationAdapter> configurer) Functional styleCustomConversions
creation 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
-