aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-06-01 14:43:49 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-06-01 14:43:49 +0200
commitabee7ce5569f3ec2dc43f0936770b3848183b9ce (patch)
tree8840025e39a861e66ac7578be7b75acdc66dc004 /sonar-core
parentb4aaf8a775f69dd5f1fe1cbc0499f10057f5bf1e (diff)
downloadsonarqube-abee7ce5569f3ec2dc43f0936770b3848183b9ce.tar.gz
sonarqube-abee7ce5569f3ec2dc43f0936770b3848183b9ce.zip
refactoring - fix MetricMapper 'key' use as it's a keyword in DBMS
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java6
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml4
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java b/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java
index a821c9bd114..233e3616075 100644
--- a/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java
@@ -27,7 +27,7 @@ public class MetricDto {
private Integer id;
- private String key;
+ private String kee;
private String shortName;
@@ -67,11 +67,11 @@ public class MetricDto {
}
public String getKey() {
- return key;
+ return kee;
}
public MetricDto setKey(String name) {
- this.key = name;
+ this.kee = name;
return this;
}
diff --git a/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml b/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml
index 04d03f221b6..e8a121e6d9f 100644
--- a/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml
@@ -5,7 +5,7 @@
<sql id="metricColumns">
m.id,
- m.name as key,
+ m.name as kee,
m.description,
m.direction,
m.domain,
@@ -63,7 +63,7 @@
name, description, direction, domain, short_name, qualitative, val_type, user_managed, enabled, origin, worst_value,
best_value, optimized_best_value, hidden, delete_historical_data)
VALUES (
- #{key, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{direction, jdbcType=INTEGER},
+ #{kee, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{direction, jdbcType=INTEGER},
#{domain, jdbcType=VARCHAR}, #{shortName, jdbcType=VARCHAR}, #{qualitative, jdbcType=BOOLEAN},
#{valueType, jdbcType=VARCHAR}, #{userManaged, jdbcType=BOOLEAN}, #{enabled, jdbcType=BOOLEAN},
#{origin, jdbcType=VARCHAR}, #{worstValue, jdbcType=DOUBLE}, #{bestValue, jdbcType=DOUBLE},