org.springframework.data.mongodb.core.mapping
Class MongoMappingContext
java.lang.Object
org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
org.springframework.data.mongodb.core.mapping.MongoMappingContext
- All Implemented Interfaces:
- Aware, InitializingBean, ApplicationContextAware, ApplicationEventPublisherAware, MappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
public class MongoMappingContext
- extends AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
- implements ApplicationContextAware
Default implementation of a MappingContext for MongoDB using BasicMongoPersistentEntity and
BasicMongoPersistentProperty as primary abstractions.
- Author:
- Jon Brisbin, Oliver Gierke
| Methods inherited from class org.springframework.data.mapping.context.AbstractMappingContext |
addPersistentEntity, addPersistentEntity, afterPropertiesSet, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrict |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MongoMappingContext
public MongoMappingContext()
- Creates a new
MongoMappingContext.
setFieldNamingStrategy
public void setFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy)
- Configures the
FieldNamingStrategy 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 - the FieldNamingStrategy to be used to determine the field name if no manual
mapping is applied.
shouldCreatePersistentEntityFor
protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> type)
- Overrides:
shouldCreatePersistentEntityFor in class AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
createPersistentProperty
public MongoPersistentProperty createPersistentProperty(Field field,
PropertyDescriptor descriptor,
BasicMongoPersistentEntity<?> owner,
SimpleTypeHolder simpleTypeHolder)
- Specified by:
createPersistentProperty in class AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
createPersistentEntity
protected <T> BasicMongoPersistentEntity<T> createPersistentEntity(TypeInformation<T> typeInformation)
- Specified by:
createPersistentEntity in class AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext in interface ApplicationContextAware
- Throws:
BeansException
Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.