Class CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter
java.lang.Object
org.springframework.data.couchbase.core.convert.CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter
- Enclosing class:
- CouchbaseCustomConversions
public static class CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter
extends Object
CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter encapsulates creation of
CustomConversions.ConverterConfiguration with CouchbaseDB specifics.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfigurePropertyConversions(Consumer<PropertyValueConverterRegistrar<CouchbasePersistentProperty>> configurationAdapter) Gateway to register property specific converters.Create aCouchbaseCustomConversions.CouchbaseConverterConfigurationAdapterusing the providedconvertersand our own codecs for JSR-310 types.registerConverter(Converter<?, ?> converter) Add a customConverterimplementation.registerConverterFactory(ConverterFactory<?, ?> converterFactory) Add a customConverterFactoryimplementation.registerConverters(Collection<?> converters) registerPropertyValueConverterFactory(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactoryimplementation used to servePropertyValueConverter.setPropertyValueConversions(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversionsto be applied during mapping.
-
Constructor Details
-
CouchbaseConverterConfigurationAdapter
public CouchbaseConverterConfigurationAdapter()
-
-
Method Details
-
from
public static CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter from(List<?> converters) Create aCouchbaseCustomConversions.CouchbaseConverterConfigurationAdapterusing the providedconvertersand our own codecs for JSR-310 types.- Parameters:
converters- must not be null.- Returns:
-
registerConverter
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter registerConverter(Converter<?, ?> converter) Add a customConverterimplementation.- Parameters:
converter- must not be null.- Returns:
- this.
-
configurePropertyConversions
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter configurePropertyConversions(Consumer<PropertyValueConverterRegistrar<CouchbasePersistentProperty>> configurationAdapter) Gateway to register property specific converters.- Parameters:
configurationAdapter- must not be null.- Returns:
- this.
-
registerConverterFactory
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter registerConverterFactory(ConverterFactory<?, ?> converterFactory) Add a customConverterFactoryimplementation.- Parameters:
converterFactory- must not be null.- Returns:
- this.
-
registerConverters
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter registerConverters(Collection<?> converters) - Parameters:
converters- must not be null nor contain null values.- Returns:
- this.
-
registerPropertyValueConverterFactory
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter registerPropertyValueConverterFactory(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactoryimplementation used to servePropertyValueConverter.- Parameters:
converterFactory- must not be null.- Returns:
- this.
-
setPropertyValueConversions
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter setPropertyValueConversions(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversionsto be applied during mapping.Use this method if
configurePropertyConversions(Consumer)andregisterPropertyValueConverterFactory(PropertyValueConverterFactory)are not sufficient.- Parameters:
valueConversions- must not be null.- Returns:
- this.
-