src/main/java/de/uapcore/lightpit/dao/postgres/PGProjectDao.java

changeset 128
947d0f6a6a83
parent 86
0a658e53177c
child 138
e2aa673dd473
equal deleted inserted replaced
127:6105ee2cceaf 128:947d0f6a6a83
83 public Project mapColumns(ResultSet result) throws SQLException { 83 public Project mapColumns(ResultSet result) throws SQLException {
84 final var proj = new Project(result.getInt("projectid")); 84 final var proj = new Project(result.getInt("projectid"));
85 proj.setName(result.getString("name")); 85 proj.setName(result.getString("name"));
86 proj.setDescription(result.getString("description")); 86 proj.setDescription(result.getString("description"));
87 proj.setRepoUrl(result.getString("repourl")); 87 proj.setRepoUrl(result.getString("repourl"));
88 88 proj.setOwner(PGUserDao.mapColumns(result));
89 final int id = result.getInt("userid");
90 if (id != 0) {
91 final var user = new User(id);
92 user.setUsername(result.getString("username"));
93 user.setGivenname(result.getString("givenname"));
94 user.setLastname(result.getString("lastname"));
95 user.setMail(result.getString("mail"));
96 proj.setOwner(user);
97 }
98 89
99 return proj; 90 return proj;
100 } 91 }
101 92
102 public IssueSummary getIssueSummary(Project project) throws SQLException { 93 public IssueSummary getIssueSummary(Project project) throws SQLException {

mercurial