Spring Data MongoDB

org.springframework.data.mongodb.core.mapping
Class MongoMappingContext

java.lang.Object
  extended by org.springframework.data.mapping.context.AbstractMappingContext<BasicMongoPersistentEntity<?>,MongoPersistentProperty>
      extended by 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

Constructor Summary
MongoMappingContext()
          Creates a new MongoMappingContext.
 
Method Summary
protected
<T> BasicMongoPersistentEntity<T>
createPersistentEntity(TypeInformation<T> typeInformation)
           
 MongoPersistentProperty createPersistentProperty(Field field, PropertyDescriptor descriptor, BasicMongoPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
           
 void setApplicationContext(ApplicationContext applicationContext)
           
protected  boolean shouldCreatePersistentEntityFor(TypeInformation<?> type)
           
 
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
 

Constructor Detail

MongoMappingContext

public MongoMappingContext()
Creates a new MongoMappingContext.

Method Detail

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

Spring Data MongoDB

Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.