src/main/kotlin/de/uapcore/lightpit/dao/DataAccessObject.kt

changeset 311
bf67e0ff7131
parent 292
703591e739f4
--- a/src/main/kotlin/de/uapcore/lightpit/dao/DataAccessObject.kt	Mon Aug 05 17:41:56 2024 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/dao/DataAccessObject.kt	Mon Aug 05 18:40:47 2024 +0200
@@ -73,7 +73,25 @@
 
     fun mergeCommitRefs(refs: List<CommitRef>)
 
+    /**
+     * Lists all issues.
+     * The result will only [includeDone] issues, if requested.
+     */
+    fun listIssues(includeDone: Boolean): List<Issue>
+
+    /**
+     * Lists issues for the specified [project].
+     * The result will only [includeDone] issues, if requested.
+     */
     fun listIssues(project: Project, includeDone: Boolean): List<Issue>
+
+    /**
+     * Lists all issues for the specified [project].
+     * The result will only [includeDone] issues, if requested.
+     * When a [specificVersion] or a [specificComponent] is requested,
+     * the result is filtered for [version] or [component] respectively.
+     * In both cases null means that only issues without version or component shall be returned.
+     */
     fun listIssues(
         project: Project,
         includeDone: Boolean,
@@ -97,19 +115,20 @@
     fun insertIssueRelation(rel: IssueRelation)
     fun deleteIssueRelation(rel: IssueRelation)
     fun listIssueRelations(issue: Issue): List<IssueRelation>
+    fun getIssueRelationMap(includeDone: Boolean): IssueRelationMap
     fun getIssueRelationMap(project: Project, includeDone: Boolean): IssueRelationMap
 
     fun insertHistoryEvent(issue: Issue, newId: Int = 0)
     fun insertHistoryEvent(issue: Issue, issueComment: IssueComment, newId: Int = 0)
 
     /**
-     * Lists the issue history of the project with [projectId] for the past [days].
+     * Lists the issue history, optionally restricted to [project], for the past [days].
      */
-    fun listIssueHistory(projectId: Int, days: Int): List<IssueHistoryEntry>
+    fun listIssueHistory(project: Project?, days: Int): List<IssueHistoryEntry>
 
     /**
-     * Lists the issue comment history of the project with [projectId] for the past [days].
+     * Lists the issue comment history, optionally restricted to [project], for the past [days].
      */
-    fun listIssueCommentHistory(projectId: Int, days: Int): List<IssueCommentHistoryEntry>
+    fun listIssueCommentHistory(project: Project?, days: Int): List<IssueCommentHistoryEntry>
     fun listCommitRefs(issue: Issue): List<CommitRef>
 }

mercurial