public abstract class AbstractCouchbaseConverter extends Object implements CouchbaseConverter, InitializingBean
CouchbaseConverter that provides the basics for the MappingCouchbaseConverter.| Modifier and Type | Field and Description |
|---|---|
protected CustomConversions |
conversions
Holds the custom conversions.
|
protected GenericConversionService |
conversionService
Contains the conversion service.
|
protected EntityInstantiators |
instantiators
Contains the entity instantiators.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCouchbaseConverter(GenericConversionService conversionService)
Create a new converter and hand it over the
ConversionService |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Do nothing after the properties set on the bean.
|
Object |
convertForWriteIfNeeded(Object value)
Convert the value if necessary to the class that would actually be stored, or leave it as is if no conversion
needed.
|
ConversionService |
getConversionService()
Return the conversion service.
|
Class<?> |
getWriteClassFor(Class<?> clazz)
Return the Class that would actually be stored for a given Class.
|
void |
setCustomConversions(CustomConversions conversions)
Set the custom conversions.
|
void |
setInstantiators(EntityInstantiators instantiators)
Set the entity instantiators.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeAlias, getTypeKeygetMappingContextreadwriteprotected final GenericConversionService conversionService
protected EntityInstantiators instantiators
protected CustomConversions conversions
protected AbstractCouchbaseConverter(GenericConversionService conversionService)
ConversionServiceconversionService - the conversion service to use.public ConversionService getConversionService()
getConversionService in interface EntityConverter<CouchbasePersistentEntity<?>,CouchbasePersistentProperty,Object,CouchbaseDocument>public void setCustomConversions(CustomConversions conversions)
conversions - the conversions.public void setInstantiators(EntityInstantiators instantiators)
instantiators - the instantiators.public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic Object convertForWriteIfNeeded(Object value)
CouchbaseConverterconvertForWriteIfNeeded in interface CouchbaseConvertervalue - the value to be converted to the class that would actually be stored.public Class<?> getWriteClassFor(Class<?> clazz)
CouchbaseConvertergetWriteClassFor in interface CouchbaseConverterclazz - the source class.CouchbaseConverter.convertForWriteIfNeeded(Object)Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.