org.springframework.data.document.mongodb.repository
Class MongoRepositoryFactoryBean<T extends MongoRepository<S,ID>,S,ID extends java.io.Serializable>

java.lang.Object
  extended by 
      extended by org.springframework.data.document.mongodb.repository.MongoRepositoryFactoryBean<T,S,ID>

public class MongoRepositoryFactoryBean<T extends MongoRepository<S,ID>,S,ID extends java.io.Serializable>
extends

org.springframework.beans.factory.FactoryBean to create MongoRepository instances.

Author:
Oliver Gierke

Nested Class Summary
(package private) static class MongoRepositoryFactoryBean.EntityInformationCreator
          Simple wrapper to to create MongoEntityInformation instances based on a MappingContext.
private static class MongoRepositoryFactoryBean.IndexEnsuringQueryCreationListener
          MongoRepositoryFactoryBean.IndexEnsuringQueryCreationListener inspecting PartTreeMongoQuerys and creating an index for the properties it refers to.
static class MongoRepositoryFactoryBean.MongoRepositoryFactory
          Repository to create MongoRepository instances.
 
Field Summary
private  MappingContext mappingContext
           
private  MongoTemplate template
           
 
Constructor Summary
MongoRepositoryFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  RepositoryFactorySupport createRepositoryFactory()
           
 void setMappingContext(MappingContext mappingContext)
          Sets the MappingContext used with the underlying MongoTemplate.
 void setTemplate(MongoTemplate template)
          Configures the MongoTemplate to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

template

private MongoTemplate template

mappingContext

private MappingContext mappingContext
Constructor Detail

MongoRepositoryFactoryBean

public MongoRepositoryFactoryBean()
Method Detail

setTemplate

public void setTemplate(MongoTemplate template)
Configures the MongoTemplate to be used.

Parameters:
template - the template to set

setMappingContext

public void setMappingContext(MappingContext mappingContext)
Sets the MappingContext used with the underlying MongoTemplate.

Parameters:
mappingContext - the mappingContext to set

createRepositoryFactory

protected RepositoryFactorySupport createRepositoryFactory()

afterPropertiesSet

public void afterPropertiesSet()