]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7330 drop unused methods of ActiveRuleMapper
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 1 Mar 2016 13:31:24 +0000 (14:31 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 1 Mar 2016 13:31:24 +0000 (14:31 +0100)
sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
sonar-db/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml

index 0c63834f8c796b330771bca426e074ea86c941a4..e7a08a978b2ab7ebc99d986b4e53335600a0407b 100644 (file)
  */
 package org.sonar.db.qualityprofile;
 
-import java.sql.Timestamp;
 import java.util.List;
 import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
 import org.apache.ibatis.annotations.Param;
 
 public interface ActiveRuleMapper {
@@ -63,9 +61,5 @@ public interface ActiveRuleMapper {
 
   List<ActiveRuleParamDto> selectParamsByActiveRuleIds(@Param("ids") List<Integer> ids);
 
-  List<ActiveRuleParamDto> selectParamsByProfileKey(String profileKey);
-
   List<ActiveRuleParamDto> selectAllParams();
-
-  List<ActiveRuleDto> selectAfterDate(@Nullable Timestamp date);
 }
index e2b43b516497a213ec38a100710b4d85dc8112ce..1c9eb67c7671a5c9237ae2096c67d880d51a7ea0 100644 (file)
     LEFT JOIN rules_profiles profile_parent ON profile_parent.kee=qp.parent_kee
   </sql>
 
-  <select id="selectAfterDate" parameterType="Date" resultType="ActiveRule"
-          fetchSize="${_scrollFetchSize}" resultSetType="FORWARD_ONLY">
-    select
-    <include refid="activeRuleKeyColumns"/>
-    from active_rules a
-    <include refid="activeRuleKeyJoin"/>
-    <where>
-      <if test="date != null">
-        a.updated_at IS NULL or a.updated_at &gt;= #{date}
-      </if>
-    </where>
-  </select>
-
   <insert id="insert" parameterType="ActiveRule" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
     INSERT INTO active_rules (profile_id, rule_id, failure_level, inheritance, created_at, updated_at)
     VALUES (#{profileId}, #{ruleId}, #{severity}, #{inheritance}, #{createdAt}, #{updatedAt})
     </where>
   </select>
 
-  <select id="selectParamsByProfileKey" parameterType="string" resultType="ActiveRuleParam">
-    select
-    <include refid="activeRuleParamColumns"/>
-    from active_rule_parameters p
-    inner join active_rules ar on ar.id=p.active_rule_id
-    inner join rules_profiles rp on rp.id=ar.profile_id
-    where rp.kee=#{id}
-  </select>
-
   <select id="selectAllParams" resultType="ActiveRuleParam">
     select
     <include refid="activeRuleParamColumns"/>