public class MongoMappingContext extends org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty> implements org.springframework.context.ApplicationContextAware
MappingContext
for MongoDB using BasicMongoPersistentEntity
and
BasicMongoPersistentProperty
as primary abstractions.Constructor and Description |
---|
MongoMappingContext()
Creates a new
MongoMappingContext . |
Modifier and Type | Method and Description |
---|---|
protected <T> BasicMongoPersistentEntity<T> |
createPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation) |
MongoPersistentProperty |
createPersistentProperty(Field field,
PropertyDescriptor descriptor,
BasicMongoPersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
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. |
protected boolean |
shouldCreatePersistentEntityFor(org.springframework.data.util.TypeInformation<?> type) |
addPersistentEntity, addPersistentEntity, afterPropertiesSet, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrict
public MongoMappingContext()
MongoMappingContext
.public 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 boolean shouldCreatePersistentEntityFor(org.springframework.data.util.TypeInformation<?> type)
shouldCreatePersistentEntityFor
in class org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
public MongoPersistentProperty createPersistentProperty(Field field, PropertyDescriptor descriptor, BasicMongoPersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
createPersistentProperty
in class org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
protected <T> BasicMongoPersistentEntity<T> createPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
createPersistentEntity
in class org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.