org.springframework.data.mongodb.repository.support
Class MongoRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>

java.lang.Object
  extended by org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
      extended by org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean<T,S,ID>
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>

public class MongoRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>

FactoryBean to create MongoRepository instances.

Author:
Oliver Gierke

Constructor Summary
MongoRepositoryFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
           
protected  org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(MongoTemplate template)
          Creates and initializes a RepositoryFactorySupport instance.
 void setCreateIndexesForQueryMethods(boolean createIndexesForQueryMethods)
          Configures whether to automatically create indexes for the properties referenced in a query method.
 void setTemplate(MongoTemplate template)
          Configures the MongoTemplate to be used.
 
Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport
getEntityInformation, getObject, getObjectType, getRepositoryInterface, isSingleton, setCustomImplementation, setNamedQueries, setQueryLookupStrategyKey, setRepositoryInterface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

setCreateIndexesForQueryMethods

public void setCreateIndexesForQueryMethods(boolean createIndexesForQueryMethods)
Configures whether to automatically create indexes for the properties referenced in a query method.

Parameters:
createIndexesForQueryMethods - the createIndexesForQueryMethods to set

createRepositoryFactory

protected final org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
Specified by:
createRepositoryFactory in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>

getFactoryInstance

protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(MongoTemplate template)
Creates and initializes a RepositoryFactorySupport instance.

Parameters:
template -
Returns:

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>


Copyright © 2011. All Rights Reserved.