27 * |
27 * |
28 */ |
28 */ |
29 package de.uapcore.lightpit.dao; |
29 package de.uapcore.lightpit.dao; |
30 |
30 |
31 import de.uapcore.lightpit.entities.Issue; |
31 import de.uapcore.lightpit.entities.Issue; |
|
32 import de.uapcore.lightpit.entities.IssueComment; |
32 import de.uapcore.lightpit.entities.Project; |
33 import de.uapcore.lightpit.entities.Project; |
33 import de.uapcore.lightpit.entities.Version; |
34 import de.uapcore.lightpit.entities.Version; |
34 |
35 |
35 import java.sql.SQLException; |
36 import java.sql.SQLException; |
36 import java.util.List; |
37 import java.util.List; |
57 * @throws SQLException on any kind of SQL error |
58 * @throws SQLException on any kind of SQL error |
58 */ |
59 */ |
59 List<Issue> list(Version version) throws SQLException; |
60 List<Issue> list(Version version) throws SQLException; |
60 |
61 |
61 /** |
62 /** |
|
63 * Lists all comments for a specific issue in chronological order. |
|
64 * |
|
65 * @param issue the issue |
|
66 * @return the list of comments |
|
67 * @throws SQLException on any kind of SQL error |
|
68 */ |
|
69 List<IssueComment> listComments(Issue issue) throws SQLException; |
|
70 |
|
71 /** |
|
72 * Stores the specified comment in database. |
|
73 * This is an update-or-insert operation. |
|
74 * |
|
75 * @param comment the comment to save |
|
76 * @throws SQLException on any kind of SQL error |
|
77 */ |
|
78 void saveComment(IssueComment comment) throws SQLException; |
|
79 |
|
80 /** |
62 * Saves an instances to the database. |
81 * Saves an instances to the database. |
63 * Implementations of this DAO must guarantee that the generated ID is stored in the instance. |
82 * Implementations of this DAO must guarantee that the generated ID is stored in the instance. |
64 * |
83 * |
65 * @param instance the instance to insert |
84 * @param instance the instance to insert |
66 * @throws SQLException on any kind of SQL error |
85 * @throws SQLException on any kind of SQL error |