34 import de.uapcore.lightpit.entities.Version; |
34 import de.uapcore.lightpit.entities.Version; |
35 |
35 |
36 import java.sql.SQLException; |
36 import java.sql.SQLException; |
37 import java.util.List; |
37 import java.util.List; |
38 |
38 |
39 public interface IssueDao extends GenericDao<Issue> { |
39 public interface IssueDao extends ChildEntityDao<Issue, Project> { |
40 |
|
41 /** |
|
42 * Lists all issues for the specified project. |
|
43 * This is not guaranteed to contain version information. |
|
44 * Use {@link #joinVersionInformation(Issue)} to obtain this information for a specific issue. |
|
45 * |
|
46 * @param project the project |
|
47 * @return a list of issues |
|
48 * @throws SQLException on any kind of SQL error |
|
49 */ |
|
50 List<Issue> list(Project project) throws SQLException; |
|
51 |
40 |
52 /** |
41 /** |
53 * Lists all issues that are somehow related to the specified version. |
42 * Lists all issues that are somehow related to the specified version. |
54 * If version is null, search for issues that are not related to any version. |
43 * If version is null, search for issues that are not related to any version. |
55 * |
44 * |
80 /** |
69 /** |
81 * Saves an instances to the database. |
70 * Saves an instances to the database. |
82 * Implementations of this DAO must guarantee that the generated ID is stored in the instance. |
71 * Implementations of this DAO must guarantee that the generated ID is stored in the instance. |
83 * |
72 * |
84 * @param instance the instance to insert |
73 * @param instance the instance to insert |
|
74 * @param project the parent project |
85 * @throws SQLException on any kind of SQL error |
75 * @throws SQLException on any kind of SQL error |
86 * @see Issue#setId(int) |
76 * @see Issue#setId(int) |
87 */ |
77 */ |
88 @Override |
78 @Override |
89 void save(Issue instance) throws SQLException; |
79 void save(Issue instance, Project project) throws SQLException; |
90 |
80 |
91 /** |
81 /** |
92 * Retrieves the affected, scheduled and resolved versions for the specified issue. |
82 * Retrieves the affected, scheduled and resolved versions for the specified issue. |
93 * |
83 * |
94 * @param issue the issue to join the information for |
84 * @param issue the issue to join the information for |