Class SimpleElasticsearchMappingContext
java.lang.Object
org.springframework.data.mapping.context.AbstractMappingContext<SimpleElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty>
org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext
- All Implemented Interfaces:
Aware,BeanFactoryAware,InitializingBean,ApplicationContextAware,ApplicationEventPublisherAware,EnvironmentAware,MappingContext<SimpleElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty>
public class SimpleElasticsearchMappingContext
extends AbstractMappingContext<SimpleElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty>
SimpleElasticsearchMappingContext
- Author:
- Rizwan Idrees, Mohsin Husen, Mark Paluch, Peter-Josef Meisch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> SimpleElasticsearchPersistentEntity<?>createPersistentEntity(TypeInformation<T> typeInformation) protected ElasticsearchPersistentPropertycreatePersistentProperty(Property property, SimpleElasticsearchPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) voidsetFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy) Configures theFieldNamingStrategyto be used to determine the field name if no manual mapping is applied.voidsetWriteTypeHints(boolean writeTypeHints) Sets the flag if type hints should be written in Entities created by this instance.protected booleanMethods inherited from class org.springframework.data.mapping.context.AbstractMappingContext
addPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationContext, setApplicationEventPublisher, setBeanFactory, setEnvironment, setInitialEntitySet, setManagedTypes, setSimpleTypeHolder, setStrict, shouldCreatePropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mapping.context.MappingContext
getRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntity
-
Constructor Details
-
SimpleElasticsearchMappingContext
public SimpleElasticsearchMappingContext()
-
-
Method Details
-
setFieldNamingStrategy
Configures theFieldNamingStrategyto be used to determine the field name if no manual mapping is applied. Defaults to a strategy using the plain property name.- Parameters:
fieldNamingStrategy- theFieldNamingStrategyto be used to determine the field name if no manual mapping is applied.- Since:
- 4.2
-
setWriteTypeHints
public void setWriteTypeHints(boolean writeTypeHints) Sets the flag if type hints should be written in Entities created by this instance.- Since:
- 4.3
-
shouldCreatePersistentEntityFor
-
createPersistentEntity
protected <T> SimpleElasticsearchPersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation) - Specified by:
createPersistentEntityin classAbstractMappingContext<SimpleElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty>
-
createPersistentProperty
protected ElasticsearchPersistentProperty createPersistentProperty(Property property, SimpleElasticsearchPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) - Specified by:
createPersistentPropertyin classAbstractMappingContext<SimpleElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty>
-