Module spring.data.cassandra
Class CassandraCustomConversions.CassandraConverterConfigurationAdapter
java.lang.Object
org.springframework.data.cassandra.core.convert.CassandraCustomConversions.CassandraConverterConfigurationAdapter
- Enclosing class:
- CassandraCustomConversions
public static class CassandraCustomConversions.CassandraConverterConfigurationAdapter
extends Object
CassandraCustomConversions.CassandraConverterConfigurationAdapter encapsulates creation of
CustomConversions.ConverterConfiguration with Cassandra specifics.- Since:
- 4.2
- Author:
- Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfigurePropertyConversions(Consumer<PropertyValueConverterRegistrar<CassandraPersistentProperty>> configurationAdapter) Gateway to register property specific converters.Create aCassandraCustomConversions.CassandraConverterConfigurationAdapterusing the providedconvertersand our own codecs for JSR-310 types.registerConverter(Converter<?, ?> converter) Add a customConverterimplementation.registerConverterFactory(ConverterFactory<?, ?> converterFactory) Add a customConverterFactoryimplementation.registerConverters(Object... converters) registerConverters(Collection<?> converters) registerPropertyValueConverterFactory(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactoryimplementation used to servePropertyValueConverter.withPropertyValueConversions(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversionsto be applied during mapping.
-
Constructor Details
-
CassandraConverterConfigurationAdapter
public CassandraConverterConfigurationAdapter()
-
-
Method Details
-
from
public static CassandraCustomConversions.CassandraConverterConfigurationAdapter from(List<?> converters) Create aCassandraCustomConversions.CassandraConverterConfigurationAdapterusing the providedconvertersand our own codecs for JSR-310 types.- Parameters:
converters- must not be null.- Returns:
-
registerConverter
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverter(Converter<?, ?> converter) Add a customConverterimplementation.- Parameters:
converter- must not be null.- Returns:
- this.
-
registerConverterFactory
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverterFactory(ConverterFactory<?, ?> converterFactory) Add a customConverterFactoryimplementation.- Parameters:
converterFactory- must not be null.- Returns:
- this.
-
registerConverters
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverters(Object... converters) - Parameters:
converters- must not be null nor contain null values.- Returns:
- this.
-
registerConverters
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverters(Collection<?> converters) - Parameters:
converters- must not be null nor contain null values.- Returns:
- this.
-
registerPropertyValueConverterFactory
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerPropertyValueConverterFactory(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactoryimplementation used to servePropertyValueConverter.- Parameters:
converterFactory- must not be null.- Returns:
- this.
-
configurePropertyConversions
public CassandraCustomConversions.CassandraConverterConfigurationAdapter configurePropertyConversions(Consumer<PropertyValueConverterRegistrar<CassandraPersistentProperty>> configurationAdapter) Gateway to register property specific converters.- Parameters:
configurationAdapter- must not be null.- Returns:
- this.
-
withPropertyValueConversions
public CassandraCustomConversions.CassandraConverterConfigurationAdapter withPropertyValueConversions(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.
-