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
-
Method Summary
Modifier and TypeMethodDescriptionconfigurePropertyConversions
(Consumer<PropertyValueConverterRegistrar<CouchbasePersistentProperty>> configurationAdapter) Gateway to register property specific converters.Create aCouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter
using the providedconverters
and our own codecs for JSR-310 types.registerConverter
(Converter<?, ?> converter) Add a customConverter
implementation.registerConverterFactory
(ConverterFactory<?, ?> converterFactory) Add a customConverterFactory
implementation.registerConverters
(Collection<?> converters) registerPropertyValueConverterFactory
(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactory
implementation used to servePropertyValueConverter
.setPropertyValueConversions
(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversions
to be applied during mapping.
-
Constructor Details
-
CouchbaseConverterConfigurationAdapter
public CouchbaseConverterConfigurationAdapter()
-
-
Method Details
-
from
public static CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter from(List<?> converters) Create aCouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter
using the providedconverters
and our own codecs for JSR-310 types.- Parameters:
converters
- must not be null.- Returns:
-
registerConverter
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter registerConverter(Converter<?, ?> converter) Add a customConverter
implementation.- 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 customConverterFactory
implementation.- 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/defaultPropertyValueConverterFactory
implementation used to servePropertyValueConverter
.- Parameters:
converterFactory
- must not be null.- Returns:
- this.
-
setPropertyValueConversions
public CouchbaseCustomConversions.CouchbaseConverterConfigurationAdapter setPropertyValueConversions(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversions
to be applied during mapping.Use this method if
configurePropertyConversions(Consumer)
andregisterPropertyValueConverterFactory(PropertyValueConverterFactory)
are not sufficient.- Parameters:
valueConversions
- must not be null.- Returns:
- this.
-