Class CouchbasePropertyValueConverterFactory

java.lang.Object
org.springframework.data.couchbase.core.convert.CouchbasePropertyValueConverterFactory
All Implemented Interfaces:
PropertyValueConverterFactory

public class CouchbasePropertyValueConverterFactory extends Object implements PropertyValueConverterFactory
Accept the Couchbase @Encrypted and @JsonValue annotations in addition to @ValueConverter annotation.
There can only be one propertyValueConverter for a property. Although there maybe be multiple annotations, getConverter(property) only returns one converter (a ChainedPropertyValueConverter might be useful). Note that valueConversions.afterPropertiesSet() (see AbstractCouchbaseConfiguration.customConversions(CryptoManager, ObjectMapper) encapsulates this in a CachingPropertyValueConverterFactory which caches by 'property'. Although CachingPropertyValueConverterFactory does have the functionality to cache by a type, it only caches by the type specified on an @ValueConverter annotation.To avoid having identical converter instances for each instance of a class containing an @JsonValue annotation, converterCacheForType is used.
Author:
Michael Reiche