Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
667feda5
Commit
667feda5
authored
3 years ago
by
Kfilippopolitis
Browse files
Options
Downloads
Patches
Plain Diff
Now a userDto is being displayed instead of username
parent
e405f005
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!28
An experiment wont any longer display the username but the whole info about the user
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/eu/hbp/mip/models/DTOs/ExperimentDTO.java
+2
-2
2 additions, 2 deletions
src/main/java/eu/hbp/mip/models/DTOs/ExperimentDTO.java
src/main/java/eu/hbp/mip/models/DTOs/UserDTO.java
+31
-0
31 additions, 0 deletions
src/main/java/eu/hbp/mip/models/DTOs/UserDTO.java
with
33 additions
and
2 deletions
src/main/java/eu/hbp/mip/models/DTOs/ExperimentDTO.java
+
2
−
2
View file @
667feda5
...
...
@@ -18,7 +18,7 @@ public class ExperimentDTO {
private
UUID
uuid
;
private
String
name
;
private
String
createdBy
;
private
UserDTO
createdBy
;
private
Date
created
;
private
Date
updated
;
private
Date
finished
;
...
...
@@ -41,7 +41,7 @@ public class ExperimentDTO {
this
.
created
=
experimentDAO
.
getCreated
();
this
.
updated
=
experimentDAO
.
getUpdated
();
this
.
finished
=
experimentDAO
.
getFinished
();
this
.
createdBy
=
experimentDAO
.
getCreatedBy
()
.
getUsername
(
);
this
.
createdBy
=
new
UserDTO
(
experimentDAO
.
getCreatedBy
());
this
.
name
=
experimentDAO
.
getName
();
if
(
includeResult
){
this
.
result
=
JsonConverters
.
convertJsonStringToObject
(
String
.
valueOf
(
experimentDAO
.
getResult
()),
new
ArrayList
<>().
getClass
());
...
...
This diff is collapsed.
Click to expand it.
src/main/java/eu/hbp/mip/models/DTOs/UserDTO.java
0 → 100644
+
31
−
0
View file @
667feda5
package
eu.hbp.mip.models.DTOs
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.google.gson.annotations.SerializedName
;
import
eu.hbp.mip.models.DAOs.ExperimentDAO
;
import
eu.hbp.mip.models.DAOs.UserDAO
;
import
eu.hbp.mip.utils.JsonConverters
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
@Data
@AllArgsConstructor
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
UserDTO
{
@SerializedName
(
"username"
)
private
String
username
;
@SerializedName
(
"fullname"
)
private
String
fullname
;
public
UserDTO
(){
}
public
UserDTO
(
UserDAO
userdao
)
{
this
.
username
=
userdao
.
getUsername
();
this
.
fullname
=
userdao
.
getFullname
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment