aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-12 14:20:54 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-12 14:29:20 +0200
commite17cf1c2dc52256336c388c5dc4bde3087c13c1c (patch)
tree37d71b5d2c711c99adfd0181618705b0558eccf0 /sonar-plugin-api/src
parent0ace9fe008ae66ca0899827556f1d45fdfeb18c5 (diff)
downloadsonarqube-e17cf1c2dc52256336c388c5dc4bde3087c13c1c.tar.gz
sonarqube-e17cf1c2dc52256336c388c5dc4bde3087c13c1c.zip
SONAR-6637 Stop filling db column PROJECT_MEASURES.RULE_PRIORITY
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java38
1 files changed, 7 insertions, 31 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java
index c2924048691..4c1d8da1a22 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java
@@ -20,23 +20,18 @@
package org.sonar.api.database.model;
import com.google.common.base.Throwables;
-import org.apache.commons.lang.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang.builder.ToStringStyle;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.rules.RulePriority;
-
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
import javax.annotation.CheckForNull;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
-
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.StandardCharsets;
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.measures.Metric;
/**
* This class is the Hibernate model to store a measure in the DB
@@ -73,10 +68,6 @@ public class MeasureModel implements Cloneable {
@Column(name = "rule_id", updatable = true, nullable = true)
private Integer ruleId;
- @Column(name = "rule_priority", updatable = false, nullable = true)
- @Enumerated(EnumType.ORDINAL)
- private RulePriority rulePriority;
-
@Column(name = "alert_status", updatable = true, nullable = true, length = 5)
private String alertStatus;
@@ -235,7 +226,7 @@ public class MeasureModel implements Cloneable {
* @return whether the measure is about rule
*/
public boolean isRuleMeasure() {
- return ruleId != null || rulePriority != null;
+ return ruleId != null;
}
public Integer getMetricId() {
@@ -278,20 +269,6 @@ public class MeasureModel implements Cloneable {
}
/**
- * @return the rule priority
- */
- public RulePriority getRulePriority() {
- return rulePriority;
- }
-
- /**
- * Sets the rule priority
- */
- public void setRulePriority(RulePriority rulePriority) {
- this.rulePriority = rulePriority;
- }
-
- /**
* @return the project id
*/
public Integer getProjectId() {
@@ -481,7 +458,6 @@ public class MeasureModel implements Cloneable {
clone.setVariationValue4(getVariationValue4());
clone.setVariationValue5(getVariationValue5());
clone.setValue(getValue());
- clone.setRulePriority(getRulePriority());
clone.setRuleId(getRuleId());
clone.setSnapshotId(getSnapshotId());
clone.setUrl(getUrl());