01: /**
02: *
03: */package org.emforge.projectmanager.dao;
04:
05: import java.util.Collection;
06:
07: import org.emforge.projectmanager.base.MilestoneDO;
08: import org.emforge.projectmanager.base.ProjectDO;
09:
10: /**
11: * @author YShevchenko
12: *
13: */
14: public interface MilestoneDAO {
15:
16: /**
17: * Returns a list of all Milestones in the system
18: * @return java.util.Collection of Milestones
19: */
20: public Collection<MilestoneDO> getMilestones();
21:
22: /**
23: * Get a Milestone Object by identifier
24: * @param id
25: * @return Milestone
26: */
27: public MilestoneDO getMilestoneById(Long id);
28:
29: /**
30: * Returns a list of Milestones assigned on Project
31: * @return java.util.Collection of Milestones
32: */
33: public Collection<MilestoneDO> getMilestonesByProject(
34: ProjectDO project);
35:
36: /**
37: * Save a Milestone
38: * If Milestone is not exists in in the data store
39: * then we should insert it,
40: * else we should update it
41: * @param milestone
42: * @return Milestone
43: */
44: public MilestoneDO saveMilestone(MilestoneDO milestone);
45:
46: /**
47: * Close a Milestone
48: * @param milestone
49: * @return Milestone
50: */
51: public MilestoneDO closeMilestone(MilestoneDO milestone);
52:
53: /**
54: * Reopen a Milestone if it was closed
55: * @param milestone
56: * @return Milestone
57: */
58: public MilestoneDO reopenMilestone(MilestoneDO milestone);
59:
60: /**
61: * Delete a Milestone from the data store
62: * @param milestone
63: */
64: public void deleteMilestone(MilestoneDO milestone);
65:
66: /** Get list of opened milestones for specified project
67: *
68: * @param project - project to select milestones
69: * @return list of opened milestones for specified project
70: */
71: public Collection<MilestoneDO> getOpenedMilestonesByProject(
72: ProjectDO project);
73:
74: /** Get list of closed milestones for specified project
75: * List returned ordered descending to the actual milestone date
76: * So, last closed milestone will be displayed first
77: *
78: * @param project - project to select milestones
79: * @return list of closed milestones for specified project
80: */
81: public Collection<MilestoneDO> getClosedMilestonesByProject(
82: ProjectDO project);
83:
84: /** Get Milestone with specified wiki page name
85: *
86: * @param i_wikiName - wiki page
87: * @return
88: */
89: public MilestoneDO getMilestoneByName(String i_wikiName);
90:
91: }
|