Class ReactiveCouchbaseRepositoryFactory
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.repository.core.support.ReactiveRepositoryFactorySupport
org.springframework.data.couchbase.repository.support.ReactiveCouchbaseRepositoryFactory
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,EnvironmentAware,EnvironmentCapable
- Since:
- 3.0
- Author:
- Subhashni Balakrishnan, Mark Paluch, Michael Reiche
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveCouchbaseRepositoryFactory(ReactiveRepositoryOperationsMapping couchbaseOperationsMapping) Create a new factory. -
Method Summary
Modifier and TypeMethodDescription<T,ID> CouchbaseEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) Returns entity information based on the domain class.protected Optional<QueryLookupStrategy>getQueryLookupStrategy(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider contextProvider) protected final Class<?>getRepositoryBaseClass(RepositoryMetadata repositoryMetadata) Returns the base class for the repository being constructed.protected ObjectgetTargetRepository(RepositoryInformation metadata) Returns a new Repository based on the metadata.voidsetBeanClassLoader(ClassLoader classLoader) Methods inherited from class org.springframework.data.repository.core.support.ReactiveRepositoryFactorySupport
getQueryLookupStrategy, setEvaluationContextProvider, validateMethods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getEnvironment, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanFactory, setEnvironment, setEvaluationContextProvider, setExposeMetadata, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass
-
Constructor Details
-
ReactiveCouchbaseRepositoryFactory
public ReactiveCouchbaseRepositoryFactory(ReactiveRepositoryOperationsMapping couchbaseOperationsMapping) Create a new factory.- Parameters:
couchbaseOperationsMapping- the template for the underlying actions.
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware- Overrides:
setBeanClassLoaderin classRepositoryFactorySupport
-
getEntityInformation
Returns entity information based on the domain class.- Specified by:
getEntityInformationin classRepositoryFactorySupport- Type Parameters:
T- the value typeID- the id type.- Parameters:
domainClass- the class for the entity.- Returns:
- entity information for that domain class.
-
getTargetRepository
Returns a new Repository based on the metadata. Two categories of repositories can be instantiated:SimpleReactiveCouchbaseRepository. This method performs feature checks to decide which of the two categories can be instantiated (eg. is N1QL available?). Instantiation is done via reflection, seegetRepositoryBaseClass(RepositoryMetadata).- Specified by:
getTargetRepositoryin classRepositoryFactorySupport- Parameters:
metadata- the repository metadata.- Returns:
- a new created repository.
-
getRepositoryBaseClass
Returns the base class for the repository being constructed. Two categories of repositories can be produced by this factory:SimpleReactiveCouchbaseRepositoryand. This method checks if N1QL is available to choose between the two, but the actual concrete class is determined respectively by. Override these methods if you want to change the base class for all your repositories.- Specified by:
getRepositoryBaseClassin classRepositoryFactorySupport- Parameters:
repositoryMetadata- metadata for the repository.- Returns:
- the base class.
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider contextProvider) - Overrides:
getQueryLookupStrategyin classRepositoryFactorySupport
-