Class DefaultRepositoryInvokerFactory
java.lang.Object
org.springframework.data.repository.support.DefaultRepositoryInvokerFactory
- All Implemented Interfaces:
RepositoryInvokerFactory
Default implementation of
RepositoryInvokerFactory to inspect the requested repository type and create a
matching RepositoryInvoker that suits the repository best. That means, the more concrete the base interface
of the repository is, the more concrete will the actual invoker become - which means it will favor concrete method
invocations over reflection ones.- Since:
- 1.10
- Author:
- Oliver Gierke, Christoph Strobl, Jens Schauder
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRepositoryInvokerFactory(Repositories repositories) Creates a newDefaultRepositoryInvokerFactoryfor the givenRepositories.DefaultRepositoryInvokerFactory(Repositories repositories, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionprotected RepositoryInvokercreateInvoker(RepositoryInformation information, Object repository) getInvokerFor(Class<?> domainType) Returns theRepositoryInvokerfor a repository managing the given domain type.
-
Constructor Details
-
DefaultRepositoryInvokerFactory
Creates a newDefaultRepositoryInvokerFactoryfor the givenRepositories.- Parameters:
repositories- must not be null.
-
DefaultRepositoryInvokerFactory
public DefaultRepositoryInvokerFactory(Repositories repositories, ConversionService conversionService) - Parameters:
repositories- must not be null.conversionService- must not be null.
-
-
Method Details
-
getInvokerFor
Description copied from interface:RepositoryInvokerFactoryReturns theRepositoryInvokerfor a repository managing the given domain type.- Specified by:
getInvokerForin interfaceRepositoryInvokerFactory- Parameters:
domainType- must not be null.- Returns:
-
createInvoker
-