1 package com.panogenesis.service.impl;
2
3 import java.util.List;
4
5 import com.panogenesis.model.Project;
6 import com.panogenesis.dao.ProjectDAO;
7 import com.panogenesis.service.ProjectManager;
8
9 public class ProjectManagerImpl extends BaseManager implements ProjectManager {
10 private ProjectDAO dao;
11
12 /***
13 * Set the DAO for communication with the data layer.
14 * @param dao
15 */
16 public void setProjectDAO(ProjectDAO dao) {
17 this.dao = dao;
18 }
19
20 /***
21 * @see com.panogenesis.service.ProjectManager#getProjects(com.panogenesis.model.Project)
22 */
23 public List getProjects(final Project project) {
24 return dao.getProjects(project);
25 }
26
27 /***
28 * @see com.panogenesis.service.ProjectManager#getProject(final String id)
29 */
30 public Project getProject(final String id) {
31 return dao.getProject(new Integer(id));
32 }
33
34 /***
35 * @see com.panogenesis.service.ProjectManager#saveProject(Project project)
36 */
37 public void saveProject(final Project project) {
38 dao.saveProject(project);
39 }
40
41 /***
42 * @see com.panogenesis.service.ProjectManager#removeProject(final Integer id)
43 */
44 public void removeProject(final String id) {
45 dao.removeProject(new Integer(id));
46 }
47 }