src/main/java/de/uapcore/lightpit/dao/IssueDao.java

changeset 75
33b6843fdf8a
parent 72
0646c14e36fb
child 86
0a658e53177c
--- a/src/main/java/de/uapcore/lightpit/dao/IssueDao.java	Fri May 22 17:26:27 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/dao/IssueDao.java	Fri May 22 21:23:57 2020 +0200
@@ -38,10 +38,31 @@
 
     /**
      * Lists all issues for the specified project.
+     * This is not guaranteed to contain version information.
+     * Use {@link #joinVersionInformation(Issue)} to obtain this information for a specific issue.
      *
      * @param project the project
      * @return a list of issues
      * @throws SQLException on any kind of SQL error
      */
     List<Issue> list(Project project) throws SQLException;
+
+    /**
+     * Saves an instances to the database.
+     * Implementations of this DAO must guarantee that the generated ID is stored in the instance.
+     *
+     * @param instance the instance to insert
+     * @throws SQLException on any kind of SQL error
+     * @see Issue#setId(int)
+     */
+    @Override
+    void save(Issue instance) throws SQLException;
+
+    /**
+     * Retrieves the affected, scheduled and resolved versions for the specified issue.
+     *
+     * @param issue the issue to join the information for
+     * @throws SQLException on any kind of SQL error
+     */
+    void joinVersionInformation(Issue issue) throws SQLException;
 }

mercurial