Class JdbcCustomConversions
java.lang.Object
org.springframework.data.convert.CustomConversions
org.springframework.data.jdbc.core.convert.JdbcCustomConversions
Value object to capture custom conversion.
JdbcCustomConversions also act as factory for
SimpleTypeHolder- Author:
- Mark Paluch, Jens Schauder, Christoph Strobl
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJdbcCustomConversions.JdbcConverterConfigurerencapsulates creation ofCustomConversions.ConverterConfigurationwith JDBC specifics.Nested classes/interfaces inherited from class CustomConversions
CustomConversions.ConverterConfiguration, CustomConversions.ConverterRegistrationIntent, CustomConversions.StoreConversions -
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyJdbcCustomConversionsobject.JdbcCustomConversions(List<?> userConverters) Create a newJdbcCustomConversionsinstance registering the given converters and the default store converters.JdbcCustomConversions(CustomConversions.ConverterConfiguration converterConfiguration) Create a newJdbcCustomConversionsinstance givenCustomConversions.ConverterConfiguration.JdbcCustomConversions(CustomConversions.StoreConversions storeConversions, List<?> userConverters) Create a newJdbcCustomConversionsinstance registering the given converters and the default store converters. -
Method Summary
Modifier and TypeMethodDescriptionstatic JdbcCustomConversionscreate(Dialect dialect, Consumer<JdbcCustomConversions.JdbcConverterConfigurer> configurer) Create a newJdbcCustomConversionsinstance using the givenDialectandJdbcCustomConversions.JdbcConverterConfigurercallback to configure converters.static JdbcCustomConversionsof(Dialect dialect, Collection<?> converters) static Collection<Object> Obtain a read only copy of default store converters.
-
Constructor Details
-
JdbcCustomConversions
public JdbcCustomConversions()Creates an emptyJdbcCustomConversionsobject. -
JdbcCustomConversions
Create a newJdbcCustomConversionsinstance registering the given converters and the default store converters.- Parameters:
userConverters- must not be null.
-
JdbcCustomConversions
public JdbcCustomConversions(CustomConversions.StoreConversions storeConversions, List<?> userConverters) Create a newJdbcCustomConversionsinstance registering the given converters and the default store converters.- Since:
- 2.3
-
JdbcCustomConversions
Create a newJdbcCustomConversionsinstance givenCustomConversions.ConverterConfiguration.- Parameters:
converterConfiguration- must not be null.- Since:
- 2.2
-
-
Method Details
-
of
- Parameters:
dialect- must not be null.converters- must not be null.- Returns:
- a new
JdbcCustomConversionsinstance configured from the given dialect and configured converters. - Since:
- 4.0
-
create
public static JdbcCustomConversions create(Dialect dialect, Consumer<JdbcCustomConversions.JdbcConverterConfigurer> configurer) Create a newJdbcCustomConversionsinstance using the givenDialectandJdbcCustomConversions.JdbcConverterConfigurercallback to configure converters.- Parameters:
dialect- theDialectto use, must not be null.configurer- the configurer callback to configure converters, must not be null.- Returns:
- a new
JdbcCustomConversionsinstance configured from the given dialect and configured converters.
-
storeConverters
Obtain a read only copy of default store converters.- Returns:
- never null.
- Since:
- 2.3
-