01: package com.technoetic.xplanner.domain.repository;
02:
03: import com.technoetic.xplanner.domain.Iteration;
04: import com.technoetic.xplanner.domain.Person;
05: import com.technoetic.xplanner.domain.Project;
06: import com.technoetic.xplanner.domain.Role;
07: import com.technoetic.xplanner.domain.Task;
08: import com.technoetic.xplanner.domain.UserStory;
09: import com.technoetic.xplanner.domain.Note;
10: import com.technoetic.xplanner.domain.Feature;
11:
12: import java.util.HashMap;
13:
14: import net.sf.hibernate.HibernateException;
15:
16: public class MetaRepositoryImpl implements MetaRepository {
17: private HashMap repositories = new HashMap();
18:
19: public void setRepositories(HashMap repositories) {
20: this .repositories = repositories;
21: }
22:
23: public ObjectRepository getRepository(Class objectClass) {
24: return (ObjectRepository) repositories.get(objectClass);
25: }
26:
27: public void setRepository(Class objectClass,
28: ObjectRepository repository) {
29: repositories.put(objectClass, repository);
30: }
31: }
|