From af8cbb165e10a9bcd5ccef57ec7813645bfaf5d4 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Tue, 1 Feb 2011 22:08:15 +0100 Subject: SONAR-2094 Add the column RULES_PROFILES.ENABLED --- .../main/java/org/sonar/api/profiles/RulesProfile.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sonar-plugin-api') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index 6a50730d308..fbf2d2bea04 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -29,11 +29,10 @@ import org.sonar.api.rules.ActiveRule; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RulePriority; +import javax.persistence.*; import java.util.ArrayList; import java.util.List; -import javax.persistence.*; - /** * This class is badly named. It should be "QualityProfile". Indeed it does not relate only to rules but to metric thresholds too. */ @@ -70,6 +69,9 @@ public class RulesProfile implements Cloneable { @Column(name = "provided", updatable = true, nullable = false) private Boolean provided = Boolean.FALSE; + @Column(name = "enabled", updatable = true, nullable = false) + private boolean enabled = true; + @Column(name = "language", updatable = true, nullable = false) private String language; @@ -177,6 +179,15 @@ public class RulesProfile implements Cloneable { this.provided = b; } + public boolean isEnabled() { + return enabled; + } + + public RulesProfile setEnabled(boolean b) { + this.enabled = b; + return this; + } + /** * @return the profile language */ -- cgit v1.2.3