Class BooleanToEnumConverterFactory
java.lang.Object
org.springframework.data.couchbase.core.convert.BooleanToEnumConverterFactory
- All Implemented Interfaces:
ConverterFactory<Boolean,
Enum>
@ReadingConverter
public class BooleanToEnumConverterFactory
extends Object
implements ConverterFactory<Boolean,Enum>
Reading Converter factory for Enums. This differs from the one provided in org.springframework.core.convert.support
by getting the result from the jackson objectmapper (which will process @JsonValue annotations) This is registered in
AbstractCouchbaseConfiguration.customConversions(CryptoManager, ObjectMapper)
.- Author:
- Michael Reiche
-
Constructor Summary
ConstructorDescriptionBooleanToEnumConverterFactory
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptiongetConverter
(Class<T> targetType) static Class<?>
getEnumType
(Class<?> targetType)
-
Constructor Details
-
BooleanToEnumConverterFactory
public BooleanToEnumConverterFactory(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getConverter
- Specified by:
getConverter
in interfaceConverterFactory<Boolean,
Enum>
-
getEnumType
-