Class KeyValueRepositoryFactory
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactory
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
RepositoryFactorySupport
specific of handing
KeyValueRepository
.- Author:
- Christoph Strobl, Oliver Gierke, Mark Paluch
-
Constructor Summary
ConstructorDescriptionKeyValueRepositoryFactory
(KeyValueOperations keyValueOperations) Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
.KeyValueRepositoryFactory
(KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
andAbstractQueryCreator
-type.KeyValueRepositoryFactory
(KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator, Class<? extends RepositoryQuery> repositoryQueryType) Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
andAbstractQueryCreator
-type. -
Method Summary
Modifier and TypeMethodDescription<T,
ID> EntityInformation<T, ID> getEntityInformation
(Class<T> domainClass) protected Optional<QueryLookupStrategy>
getQueryLookupStrategy
(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) protected Class<?>
getRepositoryBaseClass
(RepositoryMetadata metadata) getRepositoryFragments
(RepositoryMetadata metadata) getRepositoryFragments
(RepositoryMetadata metadata, KeyValueOperations operations) CreatesRepositoryComposition.RepositoryFragments
based onRepositoryMetadata
to add Key-Value-specific extensions.protected Object
getTargetRepository
(RepositoryInformation repositoryInformation) Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanClassLoader, setBeanFactory, setEvaluationContextProvider, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, validate
-
Constructor Details
-
KeyValueRepositoryFactory
Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
.- Parameters:
keyValueOperations
- must not be null.
-
KeyValueRepositoryFactory
public KeyValueRepositoryFactory(KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
andAbstractQueryCreator
-type.- Parameters:
keyValueOperations
- must not be null.queryCreator
- must not be null.
-
KeyValueRepositoryFactory
public KeyValueRepositoryFactory(KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator, Class<? extends RepositoryQuery> repositoryQueryType) Creates a newKeyValueRepositoryFactory
for the givenKeyValueOperations
andAbstractQueryCreator
-type.- Parameters:
keyValueOperations
- must not be null.queryCreator
- must not be null.repositoryQueryType
- must not be null.- Since:
- 1.1
-
-
Method Details
-
getEntityInformation
- Specified by:
getEntityInformation
in classRepositoryFactorySupport
-
getTargetRepository
- Specified by:
getTargetRepository
in classRepositoryFactorySupport
-
getRepositoryBaseClass
- Specified by:
getRepositoryBaseClass
in classRepositoryFactorySupport
-
getRepositoryFragments
protected RepositoryComposition.RepositoryFragments getRepositoryFragments(RepositoryMetadata metadata) - Overrides:
getRepositoryFragments
in classRepositoryFactorySupport
-
getRepositoryFragments
protected RepositoryComposition.RepositoryFragments getRepositoryFragments(RepositoryMetadata metadata, KeyValueOperations operations) CreatesRepositoryComposition.RepositoryFragments
based onRepositoryMetadata
to add Key-Value-specific extensions. Typically adds aQuerydslKeyValuePredicateExecutor
if the repository interface uses Querydsl.Can be overridden by subclasses to customize
RepositoryComposition.RepositoryFragments
.- Parameters:
metadata
- repository metadata.operations
- the KeyValue operations manager.- Returns:
- Since:
- 2.6
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) - Overrides:
getQueryLookupStrategy
in classRepositoryFactorySupport
-