public class DefaultRepositoryFactory extends Object implements RepositoryFactory
This class is the entry point to this framework as a whole. Using this class, you can mock a repository interface by passing the proper set of configurations and parameters.
| Constructor and Description |
|---|
DefaultRepositoryFactory(RepositoryFactoryConfiguration configuration) |
| 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.
|
public DefaultRepositoryFactory(RepositoryFactoryConfiguration configuration)
public <E> E getInstance(KeyGenerator<? extends Serializable> keyGenerator, Class<E> repositoryInterface, Class... implementations)
RepositoryFactorygetInstance in interface RepositoryFactoryE - 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 mappingspublic RepositoryFactoryConfiguration getConfiguration()
getConfiguration in interface RepositoryFactoryCopyright © 2014–2016. All rights reserved.