diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-11-25 11:07:19 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-12-02 16:39:53 +0100 |
commit | 558d2be5349c4e88105de9a27c122742833feec3 (patch) | |
tree | 0122f3914d4561f0e9d96465e45fdb98dd897f8d /sonar-core | |
parent | 6078d64d4cfb41032b4e17bec32905fa3d219ac3 (diff) | |
download | sonarqube-558d2be5349c4e88105de9a27c122742833feec3.tar.gz sonarqube-558d2be5349c4e88105de9a27c122742833feec3.zip |
rename subProjectId by parentProjectId in ComponentDto except in WS use
Conflicts:
server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java
sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java
Diffstat (limited to 'sonar-core')
3 files changed, 9 insertions, 9 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java index 9d1389309a6..94e50ab5acc 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java @@ -44,7 +44,7 @@ public class ComponentDto extends Dto<String> implements Component { private String name; private String longName; private String language; - private Long subProjectId; + private Long parentProjectId; private boolean enabled = true; private Long authorizationUpdatedAt; @@ -180,12 +180,12 @@ public class ComponentDto extends Dto<String> implements Component { } @CheckForNull - public Long subProjectId() { - return subProjectId; + public Long parentProjectId() { + return parentProjectId; } - public ComponentDto setSubProjectId(@Nullable Long subProjectId) { - this.subProjectId = subProjectId; + public ComponentDto setParentProjectId(@Nullable Long parentProjectId) { + this.parentProjectId = parentProjectId; return this; } diff --git a/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml index 3d643d6ba73..685f8e42d40 100644 --- a/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentMapper.xml @@ -15,7 +15,7 @@ p.qualifier as qualifier, p.scope as scope, p.language as language, - p.root_id as subProjectId, + p.root_id as parentProjectId, p.path as path, p.enabled as enabled, p.authorization_updated_at as authorizationUpdatedAt, @@ -149,7 +149,7 @@ <insert id="insert" parameterType="Component" keyColumn="id" useGeneratedKeys="true" keyProperty="id"> insert into projects <include refid="insertColumns"/> values (#{kee}, #{deprecatedKey}, #{uuid}, #{projectUuid}, #{moduleUuid}, #{moduleUuidPath}, #{name}, #{longName}, #{qualifier}, #{scope}, - #{language}, #{subProjectId}, #{path}, #{enabled}, #{createdAt}, #{authorizationUpdatedAt}) + #{language}, #{parentProjectId}, #{path}, #{enabled}, #{createdAt}, #{authorizationUpdatedAt}) </insert> <delete id="deleteByKey" parameterType="String"> diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java index 2816c20843b..e54956f50e3 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java @@ -38,7 +38,7 @@ public class ComponentDtoTest { .setScope("FIL") .setLanguage("java") .setPath("src/org/struts/RequestContext.java") - .setSubProjectId(3L) + .setParentProjectId(3L) .setAuthorizationUpdatedAt(123456789L); assertThat(componentDto.getId()).isEqualTo(1L); @@ -50,7 +50,7 @@ public class ComponentDtoTest { assertThat(componentDto.scope()).isEqualTo("FIL"); assertThat(componentDto.path()).isEqualTo("src/org/struts/RequestContext.java"); assertThat(componentDto.language()).isEqualTo("java"); - assertThat(componentDto.subProjectId()).isEqualTo(3L); + assertThat(componentDto.parentProjectId()).isEqualTo(3L); assertThat(componentDto.getAuthorizationUpdatedAt()).isEqualTo(123456789L); } |