From e0e6819529fc8543bcb927dce1ddf78e89c03cff Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 10 Jul 2012 16:58:35 +0200 Subject: [PATCH] SONAR-3437 Simplify mapping files --- .../database/model/MeasureMapper-oracle.xml | 40 +++++++++---------- .../api/database/model/MeasureMapper.xml | 22 +++++----- 2 files changed, 30 insertions(+), 32 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 index 2e4c7fd0d2f..bac51609efe 100644 --- 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 @@ -4,33 +4,31 @@ - - select project_measures_seq.NEXTVAL from DUAL - - INSERT INTO project_measures (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 (#{id}, - #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency}, - #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR}, - #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, + 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} ) - - select project_measures_seq.NEXTVAL from DUAL - - INSERT INTO project_measures (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 (#{id}, - #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency}, - #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR}, - #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, + VALUES ( + project_measures_seq.NEXTVAL, + #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency}, + #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus}, #{alertText}, + #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId} ) @@ -46,12 +44,12 @@ value = #{value}, metric_id = #{metricId}, rule_id = #{ruleId}, - text_value = #{textValue, jdbcType=VARCHAR}, + text_value = #{textValue}, tendency = #{tendency}, - alert_status = #{alertStatus, jdbcType=VARCHAR}, - alert_text = #{alertText, jdbcType=VARCHAR}, - url = #{url, jdbcType=VARCHAR}, - description = #{description, jdbcType=VARCHAR}, + alert_status = #{alertStatus}, + alert_text = #{alertText}, + url = #{url}, + description = #{description}, rule_priority = #{rulePriority.ordinal}, characteristic_id = #{characteristic.id}, variation_value_1 = #{variationValue1}, 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 c89f8eed8d1..e4eb62d7310 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 @@ -9,9 +9,9 @@ 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 ( - #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency}, - #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR}, - #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, + #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency}, + #{measureDate}, #{projectId}, #{alertStatus}, #{alertText}, + #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId} ) @@ -22,9 +22,9 @@ 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 ( - #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency}, - #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR}, - #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, + #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency}, + #{measureDate}, #{projectId}, #{alertStatus}, #{alertText}, + #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1}, #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId} ) @@ -40,12 +40,12 @@ value = #{value}, metric_id = #{metricId}, rule_id = #{ruleId}, - text_value = #{textValue, jdbcType=VARCHAR}, + text_value = #{textValue}, tendency = #{tendency}, - alert_status = #{alertStatus, jdbcType=VARCHAR}, - alert_text = #{alertText, jdbcType=VARCHAR}, - url = #{url, jdbcType=VARCHAR}, - description = #{description, jdbcType=VARCHAR}, + alert_status = #{alertStatus}, + alert_text = #{alertText}, + url = #{url}, + description = #{description}, rule_priority = #{rulePriority.ordinal}, characteristic_id = #{characteristic.id}, variation_value_1 = #{variationValue1}, -- 2.39.5