public abstract class AbstractCouchbaseConverter extends Object implements CouchbaseConverter, InitializingBean
CouchbaseConverter that provides the basics for the MappingCouchbaseConverter.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.data.convert.CustomConversions |
conversions
Holds the custom conversions.
|
protected GenericConversionService |
conversionService
Contains the conversion service.
|
protected org.springframework.data.mapping.model.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(org.springframework.data.convert.CustomConversions conversions)
Set the custom conversions.
|
void |
setInstantiators(org.springframework.data.mapping.model.EntityInstantiators instantiators)
Set the entity instantiators.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeAlias, getTypeKeyprotected final GenericConversionService conversionService
protected org.springframework.data.mapping.model.EntityInstantiators instantiators
protected org.springframework.data.convert.CustomConversions conversions
protected AbstractCouchbaseConverter(GenericConversionService conversionService)
ConversionServiceconversionService - the conversion service to use.public ConversionService getConversionService()
getConversionService in interface org.springframework.data.convert.EntityConverter<CouchbasePersistentEntity<?>,CouchbasePersistentProperty,Object,CouchbaseDocument>public void setCustomConversions(org.springframework.data.convert.CustomConversions conversions)
conversions - the conversions.public void setInstantiators(org.springframework.data.mapping.model.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–2023 Pivotal Software, Inc.. All rights reserved.