summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-12-16 00:56:42 +0000
committerGodin <mandrikov@gmail.com>2010-12-16 00:56:42 +0000
commit96caf6eac13b66a73d0ee572ad3a361c38e4b53a (patch)
tree73887c03c31ac8d172f93cf3e3c79a38e144d67b /sonar-plugin-api
parenta8026252cd527d5aeb5897b641ee4a8df19a452c (diff)
downloadsonarqube-96caf6eac13b66a73d0ee572ad3a361c38e4b53a.tar.gz
sonarqube-96caf6eac13b66a73d0ee572ad3a361c38e4b53a.zip
SONAR-1722: Add DB columns for profiles inheritance
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java6
2 files changed, 12 insertions, 2 deletions
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 ccc5e9d2dbd..c71d1ea1835 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,11 @@ 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.
*/
@@ -82,6 +82,10 @@ public class RulesProfile implements Cloneable {
@OneToMany(mappedBy = "rulesProfile", fetch = FetchType.LAZY)
private List<ResourceModel> projects = new ArrayList<ResourceModel>();
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "parent_id", updatable = true, nullable = true)
+ private RulesProfile parentProfile;
+
/**
* @deprecated use the factory method create()
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
index de5db8d61a8..f6f8b0fef30 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
@@ -57,6 +57,12 @@ public class ActiveRule implements Cloneable {
@OneToMany(mappedBy = "activeRule", fetch = FetchType.LAZY, cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE })
private List<ActiveRuleParam> activeRuleParams = new ArrayList<ActiveRuleParam>();
+ @Column(name = "inherited", updatable = true, nullable = true)
+ private Boolean inherited;
+
+ @Column(name = "overrides", updatable = true, nullable = true)
+ private Boolean overrides;
+
/**
* @deprecated visibility should be reduced to protected or package
*/