|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.dominate.RepositoryRegistry
public class RepositoryRegistry
A singleton that can be used to retrieve Repository instances
| Constructor Summary | |
|---|---|
RepositoryRegistry()
|
|
| Method Summary | ||
|---|---|---|
|
getRepository(Class<T> c)
Retrieve a repository for objects of the given class. |
|
|
getRepository(Collection<T> coll)
Retrieve a collection repository for the given collection. |
|
RepositoryFactory |
getRepositoryFactory()
Return the repository factory object that this registry will use to create the repositories. |
|
Class<? extends RepositoryFactory> |
getRepositoryFactoryClass()
Retrieve the repository factory class the registry will use to create new repository instances. |
|
static RepositoryRegistry |
instance()
Retrieve the singleton instance of this class |
|
static void |
setInstance(RepositoryRegistry newInstance)
Set the singleton instance that can be retrieved using instance() |
|
void |
setRepositoryFactory(RepositoryFactory repositoryFactory)
|
|
void |
setRepositoryFactoryClass(Class<? extends RepositoryFactory> repositoryFactoryClass)
Set the repository factory class the registry will use to create new repository instances. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryRegistry()
| Method Detail |
|---|
public static RepositoryRegistry instance()
public static void setInstance(RepositoryRegistry newInstance)
instance()
newInstance - the instance to be setpublic Class<? extends RepositoryFactory> getRepositoryFactoryClass()
public void setRepositoryFactoryClass(Class<? extends RepositoryFactory> repositoryFactoryClass)
repositoryFactoryClass - the repository factory the registry will usepublic RepositoryFactory getRepositoryFactory()
public void setRepositoryFactory(RepositoryFactory repositoryFactory)
public <I extends Serializable,T extends Entity<I>> Repository<I,T> getRepository(Class<T> c)
I - The class of the id of the objects contained in the constructed repositoryT - The class of the objects contained in the constructed repositoryc - The class object of the objects contained in the repository
public <I extends Serializable,T extends Entity<I>> Repository<I,T> getRepository(Collection<T> coll)
I - The class of the id of the objects contained in the constructed repositoryT - The class of the objects contained in the constructed repositoryc - the collection to be adapted as a repository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||