public class CouchbaseMappingContext extends org.springframework.data.mapping.context.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(org.springframework.data.util.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(org.springframework.data.util.TypeInformation<T> typeInformation)
Creates a concrete entity based out of the type information passed.
|
protected CouchbasePersistentProperty |
createPersistentProperty(org.springframework.data.mapping.model.Property property,
BasicCouchbasePersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
Creates a concrete property based on the field information and entity.
|
BasicCouchbasePersistentEntity<?> |
getPersistentEntity(org.springframework.data.util.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(org.springframework.data.mapping.model.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, shouldCreatePersistentEntityForpublic void setFieldNamingStrategy(org.springframework.data.mapping.model.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(org.springframework.data.util.TypeInformation<T> typeInformation)
createPersistentEntity in class org.springframework.data.mapping.context.AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>T - the type for the corresponding type information.typeInformation - type information of the entity to create.protected CouchbasePersistentProperty createPersistentProperty(org.springframework.data.mapping.model.Property property, BasicCouchbasePersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
createPersistentProperty in class org.springframework.data.mapping.context.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 org.springframework.data.mapping.context.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 org.springframework.data.mapping.context.AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>public boolean isAutoIndexCreation()
public void setAutoIndexCreation(boolean autoCreateIndexes)
protected Optional<BasicCouchbasePersistentEntity<?>> addPersistentEntity(org.springframework.data.util.TypeInformation<?> typeInformation)
addPersistentEntity in class org.springframework.data.mapping.context.AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>typeInformation - - entity typepublic BasicCouchbasePersistentEntity<?> getPersistentEntity(org.springframework.data.util.TypeInformation<?> typeInformation)
getPersistentEntity in interface org.springframework.data.mapping.context.MappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>getPersistentEntity in class org.springframework.data.mapping.context.AbstractMappingContext<BasicCouchbasePersistentEntity<?>,CouchbasePersistentProperty>typeInformation - - entity typepublic void setIndexCreator(CouchbasePersistentEntityIndexCreator indexCreator)
indexCreator - Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.