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.OBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
MongoRepositoryFactoryBean(Class<? extends T> repositoryInterface)
Creates a new
MongoRepositoryFactoryBean for the given repository interface. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
createRepositoryFactory() |
protected org.springframework.data.repository.core.support.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 |
setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext) |
void |
setMongoOperations(MongoOperations operations)
Configures the
MongoOperations to be used. |
addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragmentspublic MongoRepositoryFactoryBean(Class<? extends T> repositoryInterface)
MongoRepositoryFactoryBean for the given repository interface.repositoryInterface - must not be null.public void setMongoOperations(MongoOperations operations)
MongoOperations to be used.operations - the operations to setpublic void setCreateIndexesForQueryMethods(boolean createIndexesForQueryMethods)
createIndexesForQueryMethods - the createIndexesForQueryMethods to setpublic void setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
protected org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(MongoOperations operations)
RepositoryFactorySupport instance.operations - public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.