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

changeset 134
f47e82cd6077
parent 128
947d0f6a6a83
child 150
822b7e3d064d
--- a/src/main/java/de/uapcore/lightpit/dao/IssueDao.java	Sat Oct 17 15:21:56 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/dao/IssueDao.java	Sat Oct 17 19:56:50 2020 +0200
@@ -28,10 +28,7 @@
  */
 package de.uapcore.lightpit.dao;
 
-import de.uapcore.lightpit.entities.Issue;
-import de.uapcore.lightpit.entities.IssueComment;
-import de.uapcore.lightpit.entities.Project;
-import de.uapcore.lightpit.entities.Version;
+import de.uapcore.lightpit.entities.*;
 
 import java.sql.SQLException;
 import java.util.List;
@@ -39,14 +36,39 @@
 public interface IssueDao extends ChildEntityDao<Issue, Project> {
 
     /**
-     * Lists all issues that are somehow related to the specified version.
-     * If version is null, search for issues that are not related to any version.
+     * Lists all issues that are related to the specified component and version.
+     * If component or version is null, search for issues that are not assigned to any
+     * component or version, respectively.
      *
+     * @param project the project
+     * @param component the component or null
      * @param version the version or null
      * @return a list of issues
      * @throws SQLException on any kind of SQL error
      */
-    List<Issue> list(Version version) throws SQLException;
+    List<Issue> list(Project project, Component component, Version version) throws SQLException;
+
+    /**
+     * Lists all issues that are related to the specified version.
+     * If the version is null, lists issues that are not assigned to any version.
+     *
+     * @param project the project (mandatory)
+     * @param version the version or null
+     * @return a list of issues
+     * @throws SQLException on any kind of SQL error
+     */
+    List<Issue> list(Project project, Version version) throws SQLException;
+
+    /**
+     * Lists all issues that are related to the specified component.
+     * If the component is null, lists issues that are not assigned to a component.
+     *
+     * @param project the project (mandatory)
+     * @param component the component or null
+     * @return a list of issues
+     * @throws SQLException on any kind of SQL error
+     */
+    List<Issue> list(Project project, Component component) throws SQLException;
 
     /**
      * Lists all comments for a specific issue in chronological order.

mercurial