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

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

The 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,
      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, jdbcType=DOUBLE}, #{metricId, jdbcType=INTEGER}, #{snapshotId, jdbcType=INTEGER}, #{ruleId, jdbcType=INTEGER}, #{textValue, jdbcType=VARCHAR}, #{tendency, jdbcType=INTEGER},
      #{projectId, jdbcType=INTEGER}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR},
      #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal, jdbcType=INTEGER}, #{characteristicId, jdbcType=INTEGER}, #{variationValue1, jdbcType=DOUBLE},
      #{variationValue2, jdbcType=DOUBLE}, #{variationValue3, jdbcType=DOUBLE}, #{variationValue4, jdbcType=DOUBLE}, #{variationValue5, jdbcType=DOUBLE}, #{personId, jdbcType=INTEGER}, #{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 - 2025 Weber Informatics LLC | Privacy Policy