Class ReactiveMongoRepositoryFactoryBean<T extends Repository<S,ID> , S, ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.mongodb.repository.support.ReactiveMongoRepositoryFactoryBean<T,S,ID>
- All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, FactoryBean<T>, InitializingBean, ApplicationEventPublisherAware, EnvironmentAware, RepositoryFactoryInformation<S,ID>
public class ReactiveMongoRepositoryFactoryBean<T extends Repository<S,ID>, S, ID extends Serializable>
extends RepositoryFactoryBeanSupport<T,S,ID>
FactoryBean to create
ReactiveMongoRepository instances.- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class RepositoryFactoryBeanSupport
RepositoryFactoryBeanSupport.FragmentCreationContext, RepositoryFactoryBeanSupport.RepositoryFragmentsFunction -
Field Summary
Fields inherited from interface FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionReactiveMongoRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newReactiveMongoRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected RepositoryFactorySupportprotected ReactiveMongoRepositoryFactorygetFactoryInstance(ReactiveMongoOperations operations) Creates and initializes aRepositoryFactorySupportinstance.voidsetCreateIndexesForQueryMethods(boolean createIndexesForQueryMethods) Configures whether to automatically create indexes for the properties referenced in a query method.voidsetMappingContext(MappingContext<?, ?> mappingContext) voidsetReactiveMongoOperations(@Nullable ReactiveMongoOperations operations) Configures theReactiveMongoOperationsto be used.voidsetRepositoryFragmentsContributor(ReactiveMongoRepositoryFragmentsContributor repositoryFragmentsContributor) Configures theMongoRepositoryFragmentsContributorto contribute built-in fragment functionality to the repository.Methods inherited from class RepositoryFactoryBeanSupport
addRepositoryFactoryCustomizer, createDefaultEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEnvironment, setEvaluationContextProvider, setExposeMetadata, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments, setRepositoryFragmentsFunctionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FactoryBean
isSingleton
-
Constructor Details
-
ReactiveMongoRepositoryFactoryBean
Creates a newReactiveMongoRepositoryFactoryBeanfor the given repository interface.- Parameters:
repositoryInterface- must not be null.
-
-
Method Details
-
setReactiveMongoOperations
Configures theReactiveMongoOperationsto be used.- Parameters:
operations- the operations to set
-
getRepositoryFragmentsContributor
- Specified by:
getRepositoryFragmentsContributorin interfaceRepositoryFactoryInformation<T extends Repository<S,ID>, S> - Overrides:
getRepositoryFragmentsContributorin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
setRepositoryFragmentsContributor
public void setRepositoryFragmentsContributor(ReactiveMongoRepositoryFragmentsContributor repositoryFragmentsContributor) Configures theMongoRepositoryFragmentsContributorto contribute built-in fragment functionality to the repository.- Parameters:
repositoryFragmentsContributor- must not be null.- Since:
- 5.0
-
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
-
setMappingContext
- Overrides:
setMappingContextin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
createRepositoryFactory
- Specified by:
createRepositoryFactoryin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
getFactoryInstance
Creates and initializes aRepositoryFactorySupportinstance.- Parameters:
operations-- Returns:
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-