org.springframework.data.repository.support

## Class DefaultRepositoryInvokerFactory

- java.lang.Object
- - org.springframework.data.repository.support.DefaultRepositoryInvokerFactory

All Implemented Interfaces:
  RepositoryInvokerFactory

    public class DefaultRepositoryInvokerFactory
    extends Object
    implements 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

### Constructor Summary

Constructors
Constructor and Description
`DefaultRepositoryInvokerFactory(Repositories repositories)` Creates a new `DefaultRepositoryInvokerFactory` for the given `Repositories`.
`DefaultRepositoryInvokerFactory(Repositories repositories, ConversionService conversionService)` Creates a new `DefaultRepositoryInvokerFactory` for the given `Repositories` and `ConversionService`.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected RepositoryInvoker` `createInvoker(RepositoryInformation information, Object repository)`
`RepositoryInvoker` `getInvokerFor(Class<?> domainType)` Returns the `RepositoryInvoker` for a repository managing the given domain type.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultRepositoryInvokerFactory

    public DefaultRepositoryInvokerFactory(Repositories repositories)

Creates a new `DefaultRepositoryInvokerFactory` for the given `Repositories`.

Parameters:
  `repositories` - must not be null.

#### DefaultRepositoryInvokerFactory

    public DefaultRepositoryInvokerFactory(Repositories repositories,
                                           ConversionService conversionService)

Creates a new `DefaultRepositoryInvokerFactory` for the given `Repositories` and `ConversionService`.

Parameters:
  `repositories` - must not be null.
  `conversionService` - must not be null.

### Method Detail

#### getInvokerFor

    public RepositoryInvoker getInvokerFor(Class<?> domainType)

Description copied from interface: `RepositoryInvokerFactory`
Returns the `RepositoryInvoker` for a repository managing the given domain type.

Specified by:
  `getInvokerFor` in interface `RepositoryInvokerFactory`
Parameters:
  `domainType` - must not be null.
Returns:

#### createInvoker

    protected RepositoryInvoker createInvoker(RepositoryInformation information,
                                              Object repository)