diff options
author | Godin <mandrikov@gmail.com> | 2010-12-08 13:45:25 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-08 13:45:25 +0000 |
commit | 74c4ac9a4a5c9df13116862dd5dca982cc3f84bd (patch) | |
tree | cb57a7450654f6b1ece1f7ecf2b1a49b307f559b /sonar-core | |
parent | 72d3b0a889574cea355b61f7395b38a55071da33 (diff) | |
download | sonarqube-74c4ac9a4a5c9df13116862dd5dca982cc3f84bd.tar.gz sonarqube-74c4ac9a4a5c9df13116862dd5dca982cc3f84bd.zip |
Deprecate Rule.setPluginName() , Rule.getPluginName() and related stuff, because was replaced by repositoryKey
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java index 736d977ac30..8cb5151c7f5 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java @@ -41,13 +41,20 @@ public class RulesDao extends BaseDao { return getSession().getResults(Rule.class, "enabled", true);
}
- public List<Rule> getRulesByPlugin(String pluginKey) {
- return getSession().getResults(Rule.class, "pluginName", pluginKey, "enabled", true);
+ public List<Rule> getRulesByRepository(String repositoryKey) {
+ return getSession().getResults(Rule.class, "pluginName", repositoryKey, "enabled", true);
}
+ /**
+ * @deprecated since 2.5 use {@link #getRulesByRepository(String)} instead.
+ */
+ @Deprecated
+ public List<Rule> getRulesByPlugin(String pluginKey) {
+ return getRulesByRepository(pluginKey);
+ }
- public Rule getRuleByKey(String pluginKey, String ruleKey) {
- return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", pluginKey, "enabled", true);
+ public Rule getRuleByKey(String repositoryKey, String ruleKey) {
+ return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", repositoryKey, "enabled", true);
}
public Long countRules(List<String> plugins) {
@@ -57,7 +64,6 @@ public class RulesDao extends BaseDao { getSingleResult();
}
-
public List<RuleParam> getRuleParams() {
return getSession().getResults(RuleParam.class);
}
|