aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/main/java
diff options
context:
space:
mode:
authoralain <108417558+alain-kermis-sonarsource@users.noreply.github.com>2022-09-28 14:29:30 +0200
committersonartech <sonartech@sonarsource.com>2022-09-28 20:04:08 +0000
commit98aa88962583e2e8f59a5dd110aaa980282e6fe5 (patch)
tree05debe672be885aa58a100ace56162c4fc68a89a /server/sonar-db-dao/src/main/java
parentbb10a3475add71296daadd37480798d7f961e6ec (diff)
downloadsonarqube-98aa88962583e2e8f59a5dd110aaa980282e6fe5.tar.gz
sonarqube-98aa88962583e2e8f59a5dd110aaa980282e6fe5.zip
SONAR-17195 Move unanalyzed language flags to project level for telemetry
Diffstat (limited to 'server/sonar-db-dao/src/main/java')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchDao.java4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchMapper.java2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/PrBranchAnalyzedLanguageCountByProjectDto.java (renamed from server/sonar-db-dao/src/main/java/org/sonar/db/component/PrAndBranchCountByProjectDto.java)20
4 files changed, 24 insertions, 6 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
index 02a2576417d..14da008f50e 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
@@ -56,7 +56,7 @@ import org.sonar.db.component.ComponentMapper;
import org.sonar.db.component.ComponentWithModuleUuidDto;
import org.sonar.db.component.FilePathWithHashDto;
import org.sonar.db.component.KeyWithUuidDto;
-import org.sonar.db.component.PrAndBranchCountByProjectDto;
+import org.sonar.db.component.PrBranchAnalyzedLanguageCountByProjectDto;
import org.sonar.db.component.ProjectLinkMapper;
import org.sonar.db.component.ResourceDto;
import org.sonar.db.component.ScrapAnalysisPropertyDto;
@@ -224,7 +224,7 @@ public class MyBatis {
confBuilder.loadAlias("ProjectBadgeToken", ProjectBadgeTokenDto.class);
confBuilder.loadAlias("AnalysisPropertyValuePerProject", AnalysisPropertyValuePerProject.class);
confBuilder.loadAlias("ProjectAlmKeyAndProject", ProjectAlmKeyAndProject.class);
- confBuilder.loadAlias("PrAndBranchCountByProjectDto", PrAndBranchCountByProjectDto.class);
+ confBuilder.loadAlias("PrAndBranchCountByProjectDto", PrBranchAnalyzedLanguageCountByProjectDto.class);
confBuilder.loadAlias("ProjectMapping", ProjectMappingDto.class);
confBuilder.loadAlias("ProjectMeasure", ProjectMeasureDto.class);
confBuilder.loadAlias("PurgeableAnalysis", PurgeableAnalysisDto.class);
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchDao.java
index 3ae1a2ce788..38cca4e8201 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchDao.java
@@ -101,8 +101,8 @@ public class BranchDao implements Dao {
return mapper(dbSession).selectByProjectUuid(project.getUuid());
}
- public List<PrAndBranchCountByProjectDto> countPrAndBranchByProjectUuid(DbSession dbSession){
- return mapper(dbSession).countPrAndBranchByProjectUuid();
+ public List<PrBranchAnalyzedLanguageCountByProjectDto> countPrBranchAnalyzedLanguageByProjectUuid(DbSession dbSession){
+ return mapper(dbSession).countPrBranchAnalyzedLanguageByProjectUuid();
}
public List<BranchDto> selectByUuids(DbSession session, Collection<String> uuids) {
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchMapper.java
index 75159c2b668..9f19580941c 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/BranchMapper.java
@@ -47,7 +47,7 @@ public interface BranchMapper {
Collection<BranchDto> selectByProjectUuid(@Param("projectUuid") String projectUuid);
- List<PrAndBranchCountByProjectDto> countPrAndBranchByProjectUuid();
+ List<PrBranchAnalyzedLanguageCountByProjectDto> countPrBranchAnalyzedLanguageByProjectUuid();
List<BranchDto> selectByBranchKeys(@Param("branchKeyByProjectUuid") Map<String, String> branchKeyByProjectUuid);
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/PrAndBranchCountByProjectDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/PrBranchAnalyzedLanguageCountByProjectDto.java
index ef9149bfb8c..c4aa693479d 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/PrAndBranchCountByProjectDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/PrBranchAnalyzedLanguageCountByProjectDto.java
@@ -19,11 +19,13 @@
*/
package org.sonar.db.component;
-public class PrAndBranchCountByProjectDto {
+public class PrBranchAnalyzedLanguageCountByProjectDto {
private String projectUuid = null;
private Long pullRequest = null;
private Long branch = null;
+ private Long unanalyzedCCount = null;
+ private Long unanalyzedCppCount = null;
public String getProjectUuid() {
return projectUuid;
@@ -48,4 +50,20 @@ public class PrAndBranchCountByProjectDto {
public void setBranch(Long branch) {
this.branch = branch;
}
+
+ public Long getUnanalyzedCCount() {
+ return unanalyzedCCount;
+ }
+
+ public void setUnanalyzedCCount(Long unanalyzedCCount) {
+ this.unanalyzedCCount = unanalyzedCCount;
+ }
+
+ public Long getUnanalyzedCppCount() {
+ return unanalyzedCppCount;
+ }
+
+ public void setUnanalyzedCppCount(Long unanalyzedCppCount) {
+ this.unanalyzedCppCount = unanalyzedCppCount;
+ }
}