mapper.deleteSnapshotSource(snapshotId);
mapper.deleteSnapshotViolations(snapshotId);
mapper.deleteSnapshotWastedMeasures(snapshotId);
+ mapper.deleteSnapshotMeasuresOnQualityModelRequirements(snapshotId);
mapper.updatePurgeStatusToOne(snapshotId);
}
void deleteSnapshotWastedMeasures(long snapshotId);
+ void deleteSnapshotMeasuresOnQualityModelRequirements(long snapshotId);
+
void updatePurgeStatusToOne(long snapshotId);
void disableResource(long resourceId);
<delete id="deleteSnapshotWastedMeasures" parameterType="long">
delete from project_measures where snapshot_id=#{id} and
- (characteristic_id is not null or rule_id is not null or metric_id in (select id from metrics where
+ (rule_id is not null or metric_id in (select id from metrics where
delete_historical_data=${_true}))
</delete>
+ <delete id="deleteSnapshotMeasuresOnQualityModelRequirements" parameterType="long">
+ delete from project_measures where snapshot_id=#{id} and
+ characteristic_id in (select id from characteristics where rule_id is not null)
+ </delete>
+
<update id="updatePurgeStatusToOne" parameterType="long">
update snapshots set purge_status = 1 where id = #{id}
</update>
<dataset>
<metrics id="1" delete_historical_data="[null]"
- name="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]" worst_value="[null]" optimized_best_value="[null]" best_value="[null]"
+ name="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]"
+ worst_value="[null]" optimized_best_value="[null]" best_value="[null]"
direction="0" hidden="[false]"/>
<metrics id="2" delete_historical_data="[true]"
- name="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]" worst_value="0" optimized_best_value="[true]" best_value="100"
+ name="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]"
+ worst_value="0" optimized_best_value="[true]" best_value="100"
direction="1" hidden="[false]"/>
+ <characteristics id="1" kee="M1C1" name="M1C1" quality_model_id="1" rule_id="[null]" characteristic_order="1"
+ depth="1" description="[null]" enabled="true"/>
+ <characteristics id="2" kee="M1C2" name="M1C2" quality_model_id="1" rule_id="333" characteristic_order="1"
+ depth="2" description="[null]" enabled="true"/>
+
<snapshots id="1"
project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
<!-- do not delete standard measure -->
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="1"
- url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
- variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
committer="[null]"
- text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
<!-- delete measure on rule -->
- <!--<project_measures ID="2" project_id="1" SNAPSHOT_ID="1" RULE_ID="33" characteristic_id="[null]" METRIC_ID="1" -->
- <!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
- <!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
- <!--committer="[null]"-->
- <!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
-
- <!-- delete measure on quality model characteristic -->
- <!--<project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="22" METRIC_ID="1" -->
- <!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
- <!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
- <!--committer="[null]"-->
- <!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
+ <!--<project_measures ID="2" project_id="1" SNAPSHOT_ID="1" RULE_ID="33" characteristic_id="[null]" METRIC_ID="1"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
+ committer="[null]"
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>-->
+
+ <!-- do not delete measure on quality model characteristic -->
+ <project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="1" METRIC_ID="1"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
+ committer="[null]"
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
+
+ <!-- delete measure on quality model requirement -->
+ <!--<project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="2" METRIC_ID="1"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
+ committer="[null]"
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>-->
<!-- delete measure on metrics that are flagged with delete_historical_data=true -->
- <!--<project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"-->
- <!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
- <!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
- <!--committer="[null]"-->
- <!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
+ <!--<project_measures ID="5" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
+ committer="[null]"
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>-->
</dataset>
<dataset>
<metrics id="1" delete_historical_data="[null]"
- name="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]" worst_value="[null]" optimized_best_value="[null]" best_value="[null]"
+ name="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]"
+ worst_value="[null]" optimized_best_value="[null]" best_value="[null]"
direction="0" hidden="[false]"/>
<metrics id="2" delete_historical_data="[true]"
- name="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]" worst_value="0" optimized_best_value="[true]" best_value="100"
+ name="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" enabled="[true]"
+ worst_value="0" optimized_best_value="[true]" best_value="100"
direction="1" hidden="[false]"/>
+ <characteristics id="1" kee="M1C1" name="M1C1" quality_model_id="1" rule_id="[null]" characteristic_order="1"
+ depth="1" description="[null]" enabled="true"/>
+ <characteristics id="2" kee="M1C2" name="M1C2" quality_model_id="1" rule_id="333" characteristic_order="1"
+ depth="2" description="[null]" enabled="true"/>
+
<snapshots id="1"
project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
<!-- do not delete standard measure -->
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="1"
- url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
- variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
committer="[null]"
- text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
<!-- delete measure on rule -->
<project_measures ID="2" project_id="1" SNAPSHOT_ID="1" RULE_ID="33" characteristic_id="[null]" METRIC_ID="1"
- url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
- variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
+ committer="[null]"
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
+
+ <!-- do not delete measure on quality model characteristic -->
+ <project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="1" METRIC_ID="1"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
committer="[null]"
- text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
- <!-- delete measure on quality model characteristic -->
- <project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="22" METRIC_ID="1"
- url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
- variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ <!-- delete measure on quality model requirement -->
+ <project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="2" METRIC_ID="1"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
committer="[null]"
- text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
<!-- delete measure on metrics that are flagged with delete_historical_data=true -->
- <project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"
- url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
- variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ <project_measures ID="5" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"
+ url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]"
+ variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
+ rules_category_id="[null]"
committer="[null]"
- text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
+ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+ description="[null]"/>
</dataset>