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
- Since:
- 3.0
- Author:
- Subhashni Balakrishnan, Mark Paluch, Michael Reiche
-
Constructor Summary
ConstructorDescriptionReactiveCouchbaseRepositoryFactory
(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 final Object
getTargetRepository
(RepositoryInformation metadata) Returns a new Repository based on the metadata.void
setBeanClassLoader
(ClassLoader classLoader) Methods inherited from class org.springframework.data.repository.core.support.ReactiveRepositoryFactorySupport
setEvaluationContextProvider, validate
Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanFactory, 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:
setBeanClassLoader
in interfaceBeanClassLoaderAware
- Overrides:
setBeanClassLoader
in classRepositoryFactorySupport
-
getEntityInformation
Returns entity information based on the domain class.- Specified by:
getEntityInformation
in 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:
getTargetRepository
in 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:SimpleReactiveCouchbaseRepository
and. 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:
getRepositoryBaseClass
in classRepositoryFactorySupport
- Parameters:
repositoryMetadata
- metadata for the repository.- Returns:
- the base class.
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider contextProvider) - Overrides:
getQueryLookupStrategy
in classRepositoryFactorySupport
-