org.sonar.jpa.dao
Class RulesDao

java.lang.Object
  extended by org.sonar.jpa.dao.BaseDao
      extended by org.sonar.jpa.dao.RulesDao

public class RulesDao
extends BaseDao


Constructor Summary
RulesDao(DatabaseSession session)
           
 
Method Summary
 void addActiveRulesToProfile(List<ActiveRule> activeRules, int profileId, String pluginKey)
           
 Long countRules(List<String> plugins)
           
 RulesProfile getProfileById(int profileId)
           
 Rule getRuleByKey(String repositoryKey, String ruleKey)
           
 RuleParam getRuleParam(Rule rule, String paramKey)
           
 List<RuleParam> getRuleParams()
           
 List<Rule> getRules()
           
 List<Rule> getRulesByPlugin(String pluginKey)
          Deprecated. since 2.5 use getRulesByRepository(String) instead.
 List<Rule> getRulesByRepository(String repositoryKey)
           
 List<RuleFailureModel> getViolations(Snapshot snapshot)
           
 boolean isRuleParamEqual(RuleParam ruleParam, RuleParam ruleParamFromDatabase, String ruleKey, String pluginKey)
           
 void synchronizeRuleOfActiveRule(ActiveRule activeRule, String pluginKey)
           
 
Methods inherited from class org.sonar.jpa.dao.BaseDao
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RulesDao

public RulesDao(DatabaseSession session)
Method Detail

getRules

public List<Rule> getRules()

getRulesByRepository

public List<Rule> getRulesByRepository(String repositoryKey)

getRulesByPlugin

@Deprecated
public List<Rule> getRulesByPlugin(String pluginKey)
Deprecated. since 2.5 use getRulesByRepository(String) instead.


getRuleByKey

public Rule getRuleByKey(String repositoryKey,
                         String ruleKey)

countRules

public Long countRules(List<String> plugins)

getRuleParams

public List<RuleParam> getRuleParams()

getRuleParam

public RuleParam getRuleParam(Rule rule,
                              String paramKey)

addActiveRulesToProfile

public void addActiveRulesToProfile(List<ActiveRule> activeRules,
                                    int profileId,
                                    String pluginKey)

getViolations

public List<RuleFailureModel> getViolations(Snapshot snapshot)

synchronizeRuleOfActiveRule

public void synchronizeRuleOfActiveRule(ActiveRule activeRule,
                                        String pluginKey)

isRuleParamEqual

public boolean isRuleParamEqual(RuleParam ruleParam,
                                RuleParam ruleParamFromDatabase,
                                String ruleKey,
                                String pluginKey)

getProfileById

public RulesProfile getProfileById(int profileId)


Copyright © 2009-2011 SonarSource. All Rights Reserved.