diff options
author | David Gageot <david@gageot.net> | 2012-07-11 17:04:02 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-11 17:38:40 +0200 |
commit | 8c1b42c30880a7a12af839d264f415bb49d4de9a (patch) | |
tree | 391e01fc2c3c90569d992a9f892abc9cd6390932 /sonar-plugin-api/src | |
parent | cd2d985404cbe202d55f4024c3aa64bf1f186839 (diff) | |
download | sonarqube-8c1b42c30880a7a12af839d264f415bb49d4de9a.tar.gz sonarqube-8c1b42c30880a7a12af839d264f415bb49d4de9a.zip |
SONAR-3437 merge Mappers
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml | 53 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml | 23 |
2 files changed, 22 insertions, 54 deletions
diff --git a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml deleted file mode 100644 index 380e14ffb08..00000000000 --- a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - -<mapper namespace="org.sonar.api.database.model.MeasureMapper"> - - <insert id="insert" parameterType="MeasureModel" keyColumn="id" useGeneratedKeys="true" keyProperty="id"> - INSERT INTO project_measures ( - id, - value, metric_id, snapshot_id, rule_id, text_value, tendency, measure_date, - project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1, - variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id) - VALUES ( - project_measures_seq.NEXTVAL, - #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency}, - #{measureDate}, #{projectId}, #{alertStatus}, #{alertText}, - #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, - #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId} - ) - </insert> - - <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="true"> - INSERT INTO measure_data (id, measure_id, snapshot_id, data) - VALUES (measure_data_seq.NEXTVAL, #{id}, #{snapshotId}, #{measureData.data}) - </insert> - - <update id="deleteData" parameterType="MeasureModel"> - DELETE FROM measure_data WHERE measure_id = #{id} AND snapshot_id = #{snapshotId} - </update> - - <update id="update" parameterType="MeasureModel"> - UPDATE project_measures - SET - value = #{value}, - metric_id = #{metricId}, - rule_id = #{ruleId}, - text_value = #{textValue}, - tendency = #{tendency}, - alert_status = #{alertStatus}, - alert_text = #{alertText}, - url = #{url}, - description = #{description}, - rule_priority = #{rulePriority.ordinal}, - characteristic_id = #{characteristic.id}, - variation_value_1 = #{variationValue1}, - variation_value_2 = #{variationValue2}, - variation_value_3 = #{variationValue3}, - variation_value_4 = #{variationValue4}, - variation_value_5 = #{variationValue5}, - person_id = #{personId} - WHERE id = #{id} - </update> - -</mapper> diff --git a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml index 6823b141497..cb892f7009a 100644 --- a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml +++ b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml @@ -22,7 +22,7 @@ </insert> <update id="deleteData" parameterType="MeasureModel"> - DELETE FROM measure_data WHERE measure_id = #{id} AND snapshot_id = #{snapshotId} + DELETE FROM measure_data WHERE measure_id=#{id} AND snapshot_id=#{snapshotId} </update> <update id="update" parameterType="MeasureModel"> @@ -48,4 +48,25 @@ WHERE id = #{id} </update> + <!-- ORACLE --> + <insert id="insert" databaseId="oracle" parameterType="MeasureModel" keyColumn="id" useGeneratedKeys="true" keyProperty="id"> + INSERT INTO project_measures ( + id, + value, metric_id, snapshot_id, rule_id, text_value, tendency, measure_date, + project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1, + variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id) + VALUES ( + project_measures_seq.NEXTVAL, + #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency}, + #{measureDate}, #{projectId}, #{alertStatus}, #{alertText}, + #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, + #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId} + ) + </insert> + + <insert id="insertData" databaseId="oracle" parameterType="MeasureModel" useGeneratedKeys="true"> + INSERT INTO measure_data (id, measure_id, snapshot_id, data) + VALUES (measure_data_seq.NEXTVAL, #{id}, #{snapshotId}, #{measureData.data}) + </insert> + </mapper> |