From a60633c3404c98d97d6e05c84c2fc121f2343d9a Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 28 Apr 2015 17:07:23 +0200 Subject: [PATCH] Remove useless ResourceSnapshotMapper and rename folder dependency to design --- .../batch/protocol/output/BatchReport.java | 180 +++++++++++++++++- .../core/dependency/ResourceSnapshotDto.java | 53 ------ .../dependency/ResourceSnapshotMapper.java | 26 --- .../{dependency => design}/DependencyDto.java | 2 +- .../DependencyMapper.java | 2 +- .../{dependency => design}/package-info.java | 2 +- .../org/sonar/core/persistence/MyBatis.java | 89 +++++++-- .../dependency/ResourceSnapshotMapper.xml | 10 - .../DependencyMapper.xml | 2 +- .../ResourceSnapshotMapperTest.java | 59 ------ .../DependencyMapperTest.java | 2 +- .../ResourceSnapshotMapperTest/fixture.xml | 4 - .../DependencyMapperTest/fixture.xml | 0 13 files changed, 248 insertions(+), 183 deletions(-) delete mode 100644 sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotDto.java delete mode 100644 sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotMapper.java rename sonar-core/src/main/java/org/sonar/core/{dependency => design}/DependencyDto.java (97%) rename sonar-core/src/main/java/org/sonar/core/{dependency => design}/DependencyMapper.java (96%) rename sonar-core/src/main/java/org/sonar/core/{dependency => design}/package-info.java (96%) delete mode 100644 sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml rename sonar-core/src/main/resources/org/sonar/core/{dependency => design}/DependencyMapper.xml (84%) delete mode 100644 sonar-core/src/test/java/org/sonar/core/dependency/ResourceSnapshotMapperTest.java rename sonar-core/src/test/java/org/sonar/core/{dependency => design}/DependencyMapperTest.java (98%) delete mode 100644 sonar-core/src/test/resources/org/sonar/core/dependency/ResourceSnapshotMapperTest/fixture.xml rename sonar-core/src/test/resources/org/sonar/core/{dependency => design}/DependencyMapperTest/fixture.xml (100%) diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java index c70067cdd98..981a8877125 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java @@ -19508,7 +19508,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-     * Number of conditions to cover (never 0)
+     * Number of conditions to cover (if set, the value must be greater than 0)
      * 
*/ boolean hasConditions(); @@ -19516,53 +19516,93 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-     * Number of conditions to cover (never 0)
+     * Number of conditions to cover (if set, the value must be greater than 0)
      * 
*/ int getConditions(); /** * optional bool ut_hits = 3; + * + *
+     * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+     * 
*/ boolean hasUtHits(); /** * optional bool ut_hits = 3; + * + *
+     * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+     * 
*/ boolean getUtHits(); /** * optional bool it_hits = 4; + * + *
+     * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+     * 
*/ boolean hasItHits(); /** * optional bool it_hits = 4; + * + *
+     * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+     * 
*/ boolean getItHits(); /** * optional int32 ut_covered_conditions = 5; + * + *
+     * Number of conditions covered by unit tests
+     * 
*/ boolean hasUtCoveredConditions(); /** * optional int32 ut_covered_conditions = 5; + * + *
+     * Number of conditions covered by unit tests
+     * 
*/ int getUtCoveredConditions(); /** * optional int32 it_covered_conditions = 6; + * + *
+     * Number of conditions covered by integration tests
+     * 
*/ boolean hasItCoveredConditions(); /** * optional int32 it_covered_conditions = 6; + * + *
+     * Number of conditions covered by integration tests
+     * 
*/ int getItCoveredConditions(); /** * optional int32 overall_covered_conditions = 7; + * + *
+     * Number of conditions covered by overall tests
+     * 
*/ boolean hasOverallCoveredConditions(); /** * optional int32 overall_covered_conditions = 7; + * + *
+     * Number of conditions covered by overall tests
+     * 
*/ int getOverallCoveredConditions(); } @@ -19570,7 +19610,7 @@ public final class BatchReport { * Protobuf type {@code Coverage} * *
-   * Only FILE component has coverage information
+   * Only FILE component has coverage information, and only executable lines should contains this information.
    * TODO rename it LineCoverage ?
    * 
*/ @@ -19719,7 +19759,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-     * Number of conditions to cover (never 0)
+     * Number of conditions to cover (if set, the value must be greater than 0)
      * 
*/ public boolean hasConditions() { @@ -19729,7 +19769,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-     * Number of conditions to cover (never 0)
+     * Number of conditions to cover (if set, the value must be greater than 0)
      * 
*/ public int getConditions() { @@ -19740,12 +19780,20 @@ public final class BatchReport { private boolean utHits_; /** * optional bool ut_hits = 3; + * + *
+     * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+     * 
*/ public boolean hasUtHits() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional bool ut_hits = 3; + * + *
+     * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+     * 
*/ public boolean getUtHits() { return utHits_; @@ -19755,12 +19803,20 @@ public final class BatchReport { private boolean itHits_; /** * optional bool it_hits = 4; + * + *
+     * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+     * 
*/ public boolean hasItHits() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional bool it_hits = 4; + * + *
+     * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+     * 
*/ public boolean getItHits() { return itHits_; @@ -19770,12 +19826,20 @@ public final class BatchReport { private int utCoveredConditions_; /** * optional int32 ut_covered_conditions = 5; + * + *
+     * Number of conditions covered by unit tests
+     * 
*/ public boolean hasUtCoveredConditions() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional int32 ut_covered_conditions = 5; + * + *
+     * Number of conditions covered by unit tests
+     * 
*/ public int getUtCoveredConditions() { return utCoveredConditions_; @@ -19785,12 +19849,20 @@ public final class BatchReport { private int itCoveredConditions_; /** * optional int32 it_covered_conditions = 6; + * + *
+     * Number of conditions covered by integration tests
+     * 
*/ public boolean hasItCoveredConditions() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 it_covered_conditions = 6; + * + *
+     * Number of conditions covered by integration tests
+     * 
*/ public int getItCoveredConditions() { return itCoveredConditions_; @@ -19800,12 +19872,20 @@ public final class BatchReport { private int overallCoveredConditions_; /** * optional int32 overall_covered_conditions = 7; + * + *
+     * Number of conditions covered by overall tests
+     * 
*/ public boolean hasOverallCoveredConditions() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional int32 overall_covered_conditions = 7; + * + *
+     * Number of conditions covered by overall tests
+     * 
*/ public int getOverallCoveredConditions() { return overallCoveredConditions_; @@ -19973,7 +20053,7 @@ public final class BatchReport { * Protobuf type {@code Coverage} * *
-     * Only FILE component has coverage information
+     * Only FILE component has coverage information, and only executable lines should contains this information.
      * TODO rename it LineCoverage ?
      * 
*/ @@ -20184,7 +20264,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-       * Number of conditions to cover (never 0)
+       * Number of conditions to cover (if set, the value must be greater than 0)
        * 
*/ public boolean hasConditions() { @@ -20194,7 +20274,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-       * Number of conditions to cover (never 0)
+       * Number of conditions to cover (if set, the value must be greater than 0)
        * 
*/ public int getConditions() { @@ -20204,7 +20284,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-       * Number of conditions to cover (never 0)
+       * Number of conditions to cover (if set, the value must be greater than 0)
        * 
*/ public Builder setConditions(int value) { @@ -20217,7 +20297,7 @@ public final class BatchReport { * optional int32 conditions = 2; * *
-       * Number of conditions to cover (never 0)
+       * Number of conditions to cover (if set, the value must be greater than 0)
        * 
*/ public Builder clearConditions() { @@ -20230,18 +20310,30 @@ public final class BatchReport { private boolean utHits_ ; /** * optional bool ut_hits = 3; + * + *
+       * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+       * 
*/ public boolean hasUtHits() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional bool ut_hits = 3; + * + *
+       * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+       * 
*/ public boolean getUtHits() { return utHits_; } /** * optional bool ut_hits = 3; + * + *
+       * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+       * 
*/ public Builder setUtHits(boolean value) { bitField0_ |= 0x00000004; @@ -20251,6 +20343,10 @@ public final class BatchReport { } /** * optional bool ut_hits = 3; + * + *
+       * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+       * 
*/ public Builder clearUtHits() { bitField0_ = (bitField0_ & ~0x00000004); @@ -20262,18 +20358,30 @@ public final class BatchReport { private boolean itHits_ ; /** * optional bool it_hits = 4; + * + *
+       * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+       * 
*/ public boolean hasItHits() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional bool it_hits = 4; + * + *
+       * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+       * 
*/ public boolean getItHits() { return itHits_; } /** * optional bool it_hits = 4; + * + *
+       * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+       * 
*/ public Builder setItHits(boolean value) { bitField0_ |= 0x00000008; @@ -20283,6 +20391,10 @@ public final class BatchReport { } /** * optional bool it_hits = 4; + * + *
+       * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+       * 
*/ public Builder clearItHits() { bitField0_ = (bitField0_ & ~0x00000008); @@ -20294,18 +20406,30 @@ public final class BatchReport { private int utCoveredConditions_ ; /** * optional int32 ut_covered_conditions = 5; + * + *
+       * Number of conditions covered by unit tests
+       * 
*/ public boolean hasUtCoveredConditions() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional int32 ut_covered_conditions = 5; + * + *
+       * Number of conditions covered by unit tests
+       * 
*/ public int getUtCoveredConditions() { return utCoveredConditions_; } /** * optional int32 ut_covered_conditions = 5; + * + *
+       * Number of conditions covered by unit tests
+       * 
*/ public Builder setUtCoveredConditions(int value) { bitField0_ |= 0x00000010; @@ -20315,6 +20439,10 @@ public final class BatchReport { } /** * optional int32 ut_covered_conditions = 5; + * + *
+       * Number of conditions covered by unit tests
+       * 
*/ public Builder clearUtCoveredConditions() { bitField0_ = (bitField0_ & ~0x00000010); @@ -20326,18 +20454,30 @@ public final class BatchReport { private int itCoveredConditions_ ; /** * optional int32 it_covered_conditions = 6; + * + *
+       * Number of conditions covered by integration tests
+       * 
*/ public boolean hasItCoveredConditions() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 it_covered_conditions = 6; + * + *
+       * Number of conditions covered by integration tests
+       * 
*/ public int getItCoveredConditions() { return itCoveredConditions_; } /** * optional int32 it_covered_conditions = 6; + * + *
+       * Number of conditions covered by integration tests
+       * 
*/ public Builder setItCoveredConditions(int value) { bitField0_ |= 0x00000020; @@ -20347,6 +20487,10 @@ public final class BatchReport { } /** * optional int32 it_covered_conditions = 6; + * + *
+       * Number of conditions covered by integration tests
+       * 
*/ public Builder clearItCoveredConditions() { bitField0_ = (bitField0_ & ~0x00000020); @@ -20358,18 +20502,30 @@ public final class BatchReport { private int overallCoveredConditions_ ; /** * optional int32 overall_covered_conditions = 7; + * + *
+       * Number of conditions covered by overall tests
+       * 
*/ public boolean hasOverallCoveredConditions() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional int32 overall_covered_conditions = 7; + * + *
+       * Number of conditions covered by overall tests
+       * 
*/ public int getOverallCoveredConditions() { return overallCoveredConditions_; } /** * optional int32 overall_covered_conditions = 7; + * + *
+       * Number of conditions covered by overall tests
+       * 
*/ public Builder setOverallCoveredConditions(int value) { bitField0_ |= 0x00000040; @@ -20379,6 +20535,10 @@ public final class BatchReport { } /** * optional int32 overall_covered_conditions = 7; + * + *
+       * Number of conditions covered by overall tests
+       * 
*/ public Builder clearOverallCoveredConditions() { bitField0_ = (bitField0_ & ~0x00000040); diff --git a/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotDto.java b/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotDto.java deleted file mode 100644 index a90c2f23f57..00000000000 --- a/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotDto.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.core.dependency; - -public final class ResourceSnapshotDto { - private Long id; - private Long projectId; - private String version; - - public Long getId() { - return id; - } - - public ResourceSnapshotDto setId(Long id) { - this.id = id; - return this; - } - - public Long getProjectId() { - return projectId; - } - - public ResourceSnapshotDto setProjectId(Long projectId) { - this.projectId = projectId; - return this; - } - - public String getVersion() { - return version; - } - - public ResourceSnapshotDto setVersion(String version) { - this.version = version; - return this; - } -} diff --git a/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotMapper.java b/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotMapper.java deleted file mode 100644 index 693a630737e..00000000000 --- a/sonar-core/src/main/java/org/sonar/core/dependency/ResourceSnapshotMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.core.dependency; - -import org.apache.ibatis.session.ResultHandler; - -public interface ResourceSnapshotMapper { - void selectAll(ResultHandler handler); -} diff --git a/sonar-core/src/main/java/org/sonar/core/dependency/DependencyDto.java b/sonar-core/src/main/java/org/sonar/core/design/DependencyDto.java similarity index 97% rename from sonar-core/src/main/java/org/sonar/core/dependency/DependencyDto.java rename to sonar-core/src/main/java/org/sonar/core/design/DependencyDto.java index 4c938179ede..f7c3aa7cd21 100644 --- a/sonar-core/src/main/java/org/sonar/core/dependency/DependencyDto.java +++ b/sonar-core/src/main/java/org/sonar/core/design/DependencyDto.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.core.dependency; +package org.sonar.core.design; public final class DependencyDto { private Long id; diff --git a/sonar-core/src/main/java/org/sonar/core/dependency/DependencyMapper.java b/sonar-core/src/main/java/org/sonar/core/design/DependencyMapper.java similarity index 96% rename from sonar-core/src/main/java/org/sonar/core/dependency/DependencyMapper.java rename to sonar-core/src/main/java/org/sonar/core/design/DependencyMapper.java index 84e9771858b..d596bbca71c 100644 --- a/sonar-core/src/main/java/org/sonar/core/dependency/DependencyMapper.java +++ b/sonar-core/src/main/java/org/sonar/core/design/DependencyMapper.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.core.dependency; +package org.sonar.core.design; import org.apache.ibatis.session.ResultHandler; diff --git a/sonar-core/src/main/java/org/sonar/core/dependency/package-info.java b/sonar-core/src/main/java/org/sonar/core/design/package-info.java similarity index 96% rename from sonar-core/src/main/java/org/sonar/core/dependency/package-info.java rename to sonar-core/src/main/java/org/sonar/core/design/package-info.java index ade664442b2..23d1da72558 100644 --- a/sonar-core/src/main/java/org/sonar/core/dependency/package-info.java +++ b/sonar-core/src/main/java/org/sonar/core/design/package-info.java @@ -18,6 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @ParametersAreNonnullByDefault -package org.sonar.core.dependency; +package org.sonar.core.design; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java index 8c6edaf62a9..d95c62afbab 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java @@ -25,7 +25,11 @@ import com.google.common.io.Closeables; import org.apache.ibatis.builder.xml.XMLMapperBuilder; import org.apache.ibatis.logging.LogFactory; import org.apache.ibatis.mapping.Environment; -import org.apache.ibatis.session.*; +import org.apache.ibatis.session.Configuration; +import org.apache.ibatis.session.ExecutorType; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; import org.apache.ibatis.type.JdbcType; import org.slf4j.LoggerFactory; @@ -35,7 +39,11 @@ import org.sonar.api.database.model.MeasureModel; import org.sonar.core.activity.db.ActivityDto; import org.sonar.core.activity.db.ActivityMapper; import org.sonar.core.cluster.WorkQueue; -import org.sonar.core.component.*; +import org.sonar.core.component.ComponentDto; +import org.sonar.core.component.ComponentLinkDto; +import org.sonar.core.component.FilePathWithHashDto; +import org.sonar.core.component.SnapshotDto; +import org.sonar.core.component.UuidWithProjectUuidDto; import org.sonar.core.component.db.ComponentIndexMapper; import org.sonar.core.component.db.ComponentLinkMapper; import org.sonar.core.component.db.ComponentMapper; @@ -43,22 +51,47 @@ import org.sonar.core.component.db.SnapshotMapper; import org.sonar.core.computation.db.AnalysisReportDto; import org.sonar.core.computation.db.AnalysisReportMapper; import org.sonar.core.config.Logback; -import org.sonar.core.dashboard.*; -import org.sonar.core.dependency.DependencyDto; -import org.sonar.core.dependency.DependencyMapper; -import org.sonar.core.dependency.ResourceSnapshotDto; -import org.sonar.core.dependency.ResourceSnapshotMapper; +import org.sonar.core.dashboard.ActiveDashboardDto; +import org.sonar.core.dashboard.ActiveDashboardMapper; +import org.sonar.core.dashboard.DashboardDto; +import org.sonar.core.dashboard.DashboardMapper; +import org.sonar.core.dashboard.WidgetDto; +import org.sonar.core.dashboard.WidgetMapper; +import org.sonar.core.dashboard.WidgetPropertyDto; +import org.sonar.core.dashboard.WidgetPropertyMapper; +import org.sonar.core.design.DependencyDto; +import org.sonar.core.design.DependencyMapper; import org.sonar.core.duplication.DuplicationMapper; import org.sonar.core.duplication.DuplicationUnitDto; import org.sonar.core.event.EventDto; import org.sonar.core.event.db.EventMapper; import org.sonar.core.graph.jdbc.GraphDto; import org.sonar.core.graph.jdbc.GraphDtoMapper; -import org.sonar.core.issue.db.*; -import org.sonar.core.measure.db.*; +import org.sonar.core.issue.db.ActionPlanDto; +import org.sonar.core.issue.db.ActionPlanMapper; +import org.sonar.core.issue.db.ActionPlanStatsDto; +import org.sonar.core.issue.db.ActionPlanStatsMapper; +import org.sonar.core.issue.db.IssueChangeDto; +import org.sonar.core.issue.db.IssueChangeMapper; +import org.sonar.core.issue.db.IssueDto; +import org.sonar.core.issue.db.IssueFilterDto; +import org.sonar.core.issue.db.IssueFilterFavouriteDto; +import org.sonar.core.issue.db.IssueFilterFavouriteMapper; +import org.sonar.core.issue.db.IssueFilterMapper; +import org.sonar.core.issue.db.IssueMapper; +import org.sonar.core.measure.db.MeasureDto; +import org.sonar.core.measure.db.MeasureFilterDto; +import org.sonar.core.measure.db.MeasureFilterMapper; +import org.sonar.core.measure.db.MeasureMapper; +import org.sonar.core.measure.db.MetricMapper; import org.sonar.core.notification.db.NotificationQueueDto; import org.sonar.core.notification.db.NotificationQueueMapper; -import org.sonar.core.permission.*; +import org.sonar.core.permission.GroupWithPermissionDto; +import org.sonar.core.permission.PermissionTemplateDto; +import org.sonar.core.permission.PermissionTemplateGroupDto; +import org.sonar.core.permission.PermissionTemplateMapper; +import org.sonar.core.permission.PermissionTemplateUserDto; +import org.sonar.core.permission.UserWithPermissionDto; import org.sonar.core.persistence.dialect.Dialect; import org.sonar.core.persistence.migration.v44.Migration44Mapper; import org.sonar.core.persistence.migration.v45.Migration45Mapper; @@ -68,9 +101,22 @@ import org.sonar.core.properties.PropertyDto; import org.sonar.core.purge.IdUuidPair; import org.sonar.core.purge.PurgeMapper; import org.sonar.core.purge.PurgeableSnapshotDto; -import org.sonar.core.qualitygate.db.*; -import org.sonar.core.qualityprofile.db.*; -import org.sonar.core.resource.*; +import org.sonar.core.qualitygate.db.ProjectQgateAssociationDto; +import org.sonar.core.qualitygate.db.ProjectQgateAssociationMapper; +import org.sonar.core.qualitygate.db.QualityGateConditionDto; +import org.sonar.core.qualitygate.db.QualityGateConditionMapper; +import org.sonar.core.qualitygate.db.QualityGateDto; +import org.sonar.core.qualitygate.db.QualityGateMapper; +import org.sonar.core.qualityprofile.db.ActiveRuleDto; +import org.sonar.core.qualityprofile.db.ActiveRuleMapper; +import org.sonar.core.qualityprofile.db.ActiveRuleParamDto; +import org.sonar.core.qualityprofile.db.QualityProfileDto; +import org.sonar.core.qualityprofile.db.QualityProfileMapper; +import org.sonar.core.resource.ResourceDto; +import org.sonar.core.resource.ResourceIndexDto; +import org.sonar.core.resource.ResourceIndexerMapper; +import org.sonar.core.resource.ResourceKeyUpdaterMapper; +import org.sonar.core.resource.ResourceMapper; import org.sonar.core.rule.RuleDto; import org.sonar.core.rule.RuleMapper; import org.sonar.core.rule.RuleParamDto; @@ -80,7 +126,19 @@ import org.sonar.core.technicaldebt.db.CharacteristicMapper; import org.sonar.core.technicaldebt.db.RequirementMigrationDto; import org.sonar.core.template.LoadedTemplateDto; import org.sonar.core.template.LoadedTemplateMapper; -import org.sonar.core.user.*; +import org.sonar.core.user.AuthorDto; +import org.sonar.core.user.AuthorMapper; +import org.sonar.core.user.GroupDto; +import org.sonar.core.user.GroupMapper; +import org.sonar.core.user.GroupMembershipDto; +import org.sonar.core.user.GroupMembershipMapper; +import org.sonar.core.user.GroupRoleDto; +import org.sonar.core.user.RoleMapper; +import org.sonar.core.user.UserDto; +import org.sonar.core.user.UserGroupDto; +import org.sonar.core.user.UserGroupMapper; +import org.sonar.core.user.UserMapper; +import org.sonar.core.user.UserRoleDto; import javax.annotation.Nullable; @@ -151,7 +209,6 @@ public class MyBatis implements BatchComponent, ServerComponent { loadAlias(conf, "ProjectQgateAssociation", ProjectQgateAssociationDto.class); loadAlias(conf, "Resource", ResourceDto.class); loadAlias(conf, "ResourceIndex", ResourceIndexDto.class); - loadAlias(conf, "ResourceSnapshot", ResourceSnapshotDto.class); loadAlias(conf, "Rule", RuleDto.class); loadAlias(conf, "RuleParam", RuleParamDto.class); loadAlias(conf, "Snapshot", SnapshotDto.class); @@ -197,7 +254,7 @@ public class MyBatis implements BatchComponent, ServerComponent { DependencyMapper.class, DuplicationMapper.class, GraphDtoMapper.class, IssueMapper.class, IssueChangeMapper.class, IssueFilterMapper.class, IssueFilterFavouriteMapper.class, LoadedTemplateMapper.class, MeasureFilterMapper.class, Migration44Mapper.class, PermissionTemplateMapper.class, PropertiesMapper.class, PurgeMapper.class, - ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class, ResourceSnapshotMapper.class, RoleMapper.class, RuleMapper.class, + ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class, RoleMapper.class, RuleMapper.class, SchemaMigrationMapper.class, SemaphoreMapper.class, UserMapper.class, GroupMapper.class, UserGroupMapper.class, WidgetMapper.class, WidgetPropertyMapper.class, FileSourceMapper.class, ActionPlanMapper.class, ActionPlanStatsMapper.class, diff --git a/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml deleted file mode 100644 index b84277f4962..00000000000 --- a/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml b/sonar-core/src/main/resources/org/sonar/core/design/DependencyMapper.xml similarity index 84% rename from sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml rename to sonar-core/src/main/resources/org/sonar/core/design/DependencyMapper.xml index dc93ec177f2..313a9ba7148 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/design/DependencyMapper.xml @@ -1,7 +1,7 @@ - +