it.amattioli.dominate.memory
Class MemoryRepositoryFactory

Show UML class diagram
java.lang.Object
  extended by it.amattioli.dominate.repositories.AbstractRepositoryFactory
      extended by it.amattioli.dominate.memory.MemoryRepositoryFactory
All Implemented Interfaces:
RepositoryFactory

public class MemoryRepositoryFactory
extends AbstractRepositoryFactory


Constructor Summary
MemoryRepositoryFactory()
           
 
Method Summary
protected
<I extends Serializable,T extends Entity<I>>
Repository<I,T>
getDefaultRepository(Class<T> c)
          Create a default repository for objects of class c.
<I extends Serializable,T extends Entity<I>>
Repository<I,T>
getRepository(Collection<T> coll)
          Create an adapter that present the given collection as a repository.
 
Methods inherited from class it.amattioli.dominate.repositories.AbstractRepositoryFactory
getRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryRepositoryFactory

public MemoryRepositoryFactory()
Method Detail

getRepository

public <I extends Serializable,T extends Entity<I>> Repository<I,T> getRepository(Collection<T> coll)
Description copied from interface: RepositoryFactory
Create an adapter that present the given collection as a repository.

Type Parameters:
I - The class of the id of the objects contained in the constructed repository
T - The class of the objects contained in the constructed repository
Parameters:
coll - The collection that will be adapted as a repository
Returns:
the newly created repository

getDefaultRepository

protected <I extends Serializable,T extends Entity<I>> Repository<I,T> getDefaultRepository(Class<T> c)
Description copied from class: AbstractRepositoryFactory
Create a default repository for objects of class c. This method is called by AbstractRepositoryFactory.getRepository(Class) if it cannot find a custom factory method

Specified by:
getDefaultRepository in class AbstractRepositoryFactory
Returns:


Copyright © 2011. All Rights Reserved.