public class CouchbaseMappingContext extends AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty> implements ApplicationContextAware
MappingContext for Couchbase using
BasicCouchbasePersistentEntity and BasicCouchbasePersistentProperty as primary abstractions.| Constructor and Description |
|---|
CouchbaseMappingContext() |
| Modifier and Type | Method and Description |
|---|---|
protected Optional<BasicCouchbasePersistentEntity<?>> |
addPersistentEntity(TypeInformation<?> typeInformation)
override method from AbstractMappingContext as that method will not publishEvent() if it finds the entity has
already been cached
|
protected <T> BasicCouchbasePersistentEntity<?> |
createPersistentEntity(TypeInformation<T> typeInformation)
Creates a concrete entity based out of the type information passed.
|
protected CouchbasePersistentProperty |
createPersistentProperty(Property property,
BasicCouchbasePersistentEntity<?> owner,
SimpleTypeHolder simpleTypeHolder)
Creates a concrete property based on the field information and entity.
|
BasicCouchbasePersistentEntity<?> |
getPersistentEntity(TypeInformation<?> typeInformation)
override method from AbstractMappingContext as that method will not publishEvent() if it finds the entity has
already been cached.
|
boolean |
isAutoIndexCreation() |
void |
setApplicationContext(ApplicationContext applicationContext)
Sets (or overrides) the current application context.
|
void |
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) |
void |
setAutoIndexCreation(boolean autoCreateIndexes) |
void |
setFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy)
Configures the
FieldNamingStrategy to be used to determine the field name if no manual mapping is applied. |
void |
setIndexCreator(CouchbasePersistentEntityIndexCreator indexCreator)
capture the indexCreator when it has been added as a listener. only publishEvent() if the indexCreator hasn't
already seen the class.
|
addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setInitialEntitySet, setSimpleTypeHolder, setStrict, shouldCreatePersistentEntityForclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic void setFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy)
FieldNamingStrategy to be used to determine the field name if no manual mapping is applied.
Defaults to a strategy using the plain property name.fieldNamingStrategy - the FieldNamingStrategy to be used to determine the field name if no manual
mapping is applied.protected <T> BasicCouchbasePersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation)
createPersistentEntity in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>T - the type for the corresponding type information.typeInformation - type information of the entity to create.protected CouchbasePersistentProperty createPersistentProperty(Property property, BasicCouchbasePersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
createPersistentProperty in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>property - the property descriptor.owner - the entity which owns the property.simpleTypeHolder - the type holder.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwaresetApplicationContext in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>applicationContext - the application context to be assigned.BeansException - if the context can not be set properly.public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAwaresetApplicationEventPublisher in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>public boolean isAutoIndexCreation()
public void setAutoIndexCreation(boolean autoCreateIndexes)
protected Optional<BasicCouchbasePersistentEntity<?>> addPersistentEntity(TypeInformation<?> typeInformation)
addPersistentEntity in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>typeInformation - - entity typepublic BasicCouchbasePersistentEntity<?> getPersistentEntity(TypeInformation<?> typeInformation)
getPersistentEntity in interface MappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>getPersistentEntity in class AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>typeInformation - - entity typepublic void setIndexCreator(CouchbasePersistentEntityIndexCreator indexCreator)
indexCreator - Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.