diff options
author | Michal Duda <michal.duda@sonarsource.com> | 2020-04-23 20:16:38 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-05-25 20:05:22 +0000 |
commit | bf05b3c7c2e5157047dccefcfb38af0033c77f20 (patch) | |
tree | ab4dcbce1ecf30e9782c8ec3bdc56f607ce1e1b0 /server/sonar-webserver-api | |
parent | 88e71c8c976210624ddb296f24f2ddcbe53417b4 (diff) | |
download | sonarqube-bf05b3c7c2e5157047dccefcfb38af0033c77f20.tar.gz sonarqube-bf05b3c7c2e5157047dccefcfb38af0033c77f20.zip |
SONAR-13221 change PK of RULES and update FK
Diffstat (limited to 'server/sonar-webserver-api')
2 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/QProfileRules.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/QProfileRules.java index afa3e91a150..a866e16b168 100644 --- a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/QProfileRules.java +++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/QProfileRules.java @@ -52,7 +52,7 @@ public interface QProfileRules { */ BulkChangeResult bulkActivateAndCommit(DbSession dbSession, QProfileDto profile, RuleQuery ruleQuery, @Nullable String severity); - List<ActiveRuleChange> deactivateAndCommit(DbSession dbSession, QProfileDto profile, Collection<Integer> ruleIds); + List<ActiveRuleChange> deactivateAndCommit(DbSession dbSession, QProfileDto profile, Collection<String> ruleUuids); BulkChangeResult bulkDeactivateAndCommit(DbSession dbSession, QProfileDto profile, RuleQuery ruleQuery); diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java index 59905c5c3e8..e1fb91327a6 100644 --- a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java +++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java @@ -33,13 +33,13 @@ import org.sonar.api.rule.Severity; @Immutable public class RuleActivation { - private final int ruleId; + private final String ruleUuid; private final boolean reset; private final String severity; private final Map<String, String> parameters = new HashMap<>(); - private RuleActivation(int ruleId, boolean reset, @Nullable String severity, @Nullable Map<String, String> parameters) { - this.ruleId = ruleId; + private RuleActivation(String ruleUuid, boolean reset, @Nullable String severity, @Nullable Map<String, String> parameters) { + this.ruleUuid = ruleUuid; this.reset = reset; this.severity = severity; if (severity != null && !Severity.ALL.contains(severity)) { @@ -52,16 +52,16 @@ public class RuleActivation { } } - public static RuleActivation createReset(int ruleId) { - return new RuleActivation(ruleId, true, null, null); + public static RuleActivation createReset(String ruleUuid) { + return new RuleActivation(ruleUuid, true, null, null); } - public static RuleActivation create(int ruleId, @Nullable String severity, @Nullable Map<String, String> parameters) { - return new RuleActivation(ruleId, false, severity, parameters); + public static RuleActivation create(String ruleUuid, @Nullable String severity, @Nullable Map<String, String> parameters) { + return new RuleActivation(ruleUuid, false, severity, parameters); } - public static RuleActivation create(int ruleId) { - return create(ruleId, null, null); + public static RuleActivation create(String ruleUuid) { + return create(ruleUuid, null, null); } /** @@ -72,8 +72,8 @@ public class RuleActivation { return severity; } - public int getRuleId() { - return ruleId; + public String getRuleUuid() { + return ruleUuid; } @CheckForNull |