public interface RepositoryFactory
This interface encapsulates the process of instantiating a repository. A repository factory is needed to properly set up a repository instance.
A default implementation is provided via default
repositor factory.
| Modifier and Type | Method and Description |
|---|---|
RepositoryFactoryConfiguration |
getConfiguration() |
<E> E |
getInstance(KeyGenerator<? extends Serializable> keyGenerator,
Class<E> repositoryInterface,
Class... implementations)
Creates an instance of the repository as per the provided configuration.
|
<E> E getInstance(KeyGenerator<? extends Serializable> keyGenerator, Class<E> repositoryInterface, Class... implementations)
E - the type of the interfacekeyGenerator - the key generator to use when inserting items (if auto generation is required).
You can specify a null key generator to signify that the fallback key generator should be used when generating keys.repositoryInterface - the repository interface which we want to mockimplementations - all the concrete classes that can be used to figure out method mappingsRepositoryMockException - should anything go wrongRepositoryFactoryConfiguration getConfiguration()
Copyright © 2014–2016. All rights reserved.