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