Spring Data MongoDB

org.springframework.data.mongodb.repository.support
Class MongoRepositoryFactoryBean<T extends 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:
FactoryBean<T>, InitializingBean, RepositoryFactoryInformation<S,ID>

public class MongoRepositoryFactoryBean<T extends Repository<S,ID>,S,ID extends Serializable>
extends RepositoryFactoryBeanSupport<T,S,ID>

FactoryBean to create MongoRepository instances.

Author:
Oliver Gierke

Constructor Summary
MongoRepositoryFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  RepositoryFactorySupport createRepositoryFactory()
           
protected  RepositoryFactorySupport getFactoryInstance(MongoOperations operations)
          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 setMongoOperations(MongoOperations operations)
          Configures the MongoOperations to be used.
 
Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport
getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setCustomImplementation, setMappingContext, 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

setMongoOperations

public void setMongoOperations(MongoOperations operations)
Configures the MongoOperations to be used.

Parameters:
operations - the operations 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 RepositoryFactorySupport createRepositoryFactory()
Specified by:
createRepositoryFactory in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>

getFactoryInstance

protected RepositoryFactorySupport getFactoryInstance(MongoOperations operations)
Creates and initializes a RepositoryFactorySupport instance.

Parameters:
operations -
Returns:

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>

Spring Data MongoDB

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