summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-core/src/main/java/org/sonar/core/user/AuthorDto.java14
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper-oracle.xml2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java6
3 files changed, 11 insertions, 11 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/user/AuthorDto.java b/sonar-core/src/main/java/org/sonar/core/user/AuthorDto.java
index 63e22bbcff7..0a42b3d166c 100644
--- a/sonar-core/src/main/java/org/sonar/core/user/AuthorDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/user/AuthorDto.java
@@ -24,28 +24,28 @@ import java.util.Date;
/**
* @since 2.15
*/
-public class AuthorDto {
+public final class AuthorDto {
- private Integer id;
- private Integer personId;
+ private Long id;
+ private Long personId;
private String login;
private Date createdAt;
private Date updatedAt;
- public Integer getId() {
+ public Long getId() {
return id;
}
- public AuthorDto setId(Integer id) {
+ public AuthorDto setId(Long id) {
this.id = id;
return this;
}
- public Integer getPersonId() {
+ public Long getPersonId() {
return personId;
}
- public AuthorDto setPersonId(Integer personId) {
+ public AuthorDto setPersonId(Long personId) {
this.personId = personId;
return this;
}
diff --git a/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper-oracle.xml
index 70439809d16..cee04a426df 100644
--- a/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper-oracle.xml
@@ -10,7 +10,7 @@
<insert id="insert" parameterType="Author" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
<selectKey order="BEFORE" resultType="Long" keyProperty="id">
- select dashboards_seq.NEXTVAL from DUAL
+ select authors_seq.NEXTVAL from DUAL
</selectKey>
INSERT INTO authors (id, person_id, login, created_at, updated_at)
VALUES (#{id}, #{personId, jdbcType=INTEGER}, #{login, jdbcType=VARCHAR},
diff --git a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java
index ed0944362b0..75a13aebc44 100644
--- a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java
@@ -41,8 +41,8 @@ public class AuthorDaoTest extends DaoTestCase {
setupData("shouldSelect");
AuthorDto authorDto = dao.select("godin");
- assertThat(authorDto.getId(), is(1));
- assertThat(authorDto.getPersonId(), is(13));
+ assertThat(authorDto.getId(), is(1L));
+ assertThat(authorDto.getPersonId(), is(13L));
assertThat(authorDto.getLogin(), is("godin"));
assertThat(dao.select("simon"), is(nullValue()));
@@ -54,7 +54,7 @@ public class AuthorDaoTest extends DaoTestCase {
AuthorDto authorDto = new AuthorDto()
.setLogin("godin")
- .setPersonId(13);
+ .setPersonId(13L);
dao.insert(authorDto);