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.CassandraConverterConfigurationAdapter
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
(Object... converters) registerConverters
(Collection<?> converters) registerPropertyValueConverterFactory
(PropertyValueConverterFactory converterFactory) Add a custom/defaultPropertyValueConverterFactory
implementation used to servePropertyValueConverter
.withPropertyValueConversions
(PropertyValueConversions valueConversions) Optionally set thePropertyValueConversions
to be applied during mapping.
-
Constructor Details
-
CassandraConverterConfigurationAdapter
public CassandraConverterConfigurationAdapter()
-
-
Method Details
-
from
public static CassandraCustomConversions.CassandraConverterConfigurationAdapter from(List<?> converters) Create aCassandraCustomConversions.CassandraConverterConfigurationAdapter
using the providedconverters
and our own codecs for JSR-310 types.- Parameters:
converters
- must not be null.- Returns:
-
registerConverter
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverter(Converter<?, ?> converter) Add a customConverter
implementation.- Parameters:
converter
- must not be null.- Returns:
- this.
-
registerConverterFactory
public CassandraCustomConversions.CassandraConverterConfigurationAdapter registerConverterFactory(ConverterFactory<?, ?> converterFactory) Add a customConverterFactory
implementation.- 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/defaultPropertyValueConverterFactory
implementation 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 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.
-