All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.api.database.model.MeasureMapper.xml Maven / Gradle / Ivy

There is a newer version: 5.1
Show newest version
<?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" useGeneratedKeys="false">
    INSERT INTO project_measures (
      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, measure_data)
    VALUES (
      #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency},
      #{measureDate}, #{projectId}, #{alertStatus}, #{alertText},
      #{url}, #{description}, #{rulePriority.ordinal}, #{characteristicId}, #{variationValue1},
      #{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId}, #{data}
    )
  </insert>

  <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 = #{characteristicId},
      variation_value_1 = #{variationValue1},
      variation_value_2 = #{variationValue2},
      variation_value_3 = #{variationValue3},
      variation_value_4 = #{variationValue4},
      variation_value_5 = #{variationValue5},
      person_id = #{personId},
      measure_data = #{data}
    WHERE id = #{id}
  </update>

</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy