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:
- EventListener, Aware, ApplicationContextAware, ApplicationEventPublisherAware, ApplicationListener<ContextRefreshedEvent>, 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, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, initialize, onApplicationEvent, 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
.
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
- Overrides:
setApplicationContext
in class AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
- Throws:
BeansException
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.