• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DataBiosphere / consent / #5971

28 May 2025 01:45PM UTC coverage: 78.503% (-0.06%) from 78.558%
#5971

push

web-flow
DT-1662: Ensure single Library Card per User (#2536)

83 of 86 new or added lines in 9 files covered. (96.51%)

4 existing lines in 3 files now uncovered.

10028 of 12774 relevant lines covered (78.5%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/src/main/java/org/broadinstitute/consent/http/models/UserRole.java
1
package org.broadinstitute.consent.http.models;
2

3
import com.fasterxml.jackson.annotation.JsonProperty;
4
import com.google.common.base.Objects;
5
import com.google.gson.Gson;
6

7
public class UserRole {
8

9
  @JsonProperty
10
  private Integer userRoleId;
11

12
  @JsonProperty
13
  private Integer userId;
14

15
  @JsonProperty
16
  private Integer roleId;
17

18
  @JsonProperty
19
  private String name;
20

21
  @JsonProperty
22
  private Integer dacId;
23

24
  public UserRole() {
1✔
25
  }
1✔
26

27
  public UserRole(Integer roleId, String name) {
1✔
28
    this.roleId = roleId;
1✔
29
    this.name = name;
1✔
30
  }
1✔
31

32
  public UserRole(Integer userRoleId, Integer userId, Integer roleId, String name, Integer dacId) {
1✔
33
    this.userRoleId = userRoleId;
1✔
34
    this.userId = userId;
1✔
35
    this.roleId = roleId;
1✔
36
    this.name = name;
1✔
37
    this.dacId = dacId;
1✔
38
  }
1✔
39

40
  public Integer getUserRoleId() {
41
    return userRoleId;
1✔
42
  }
43

44
  public void setUserRoleId(Integer userRoleId) {
UNCOV
45
    this.userRoleId = userRoleId;
×
UNCOV
46
  }
×
47

48
  public Integer getUserId() {
49
    return userId;
1✔
50
  }
51

52
  public void setUserId(Integer userId) {
53
    this.userId = userId;
1✔
54
  }
1✔
55

56
  public Integer getRoleId() {
57
    return roleId;
1✔
58
  }
59

60
  public void setRoleId(Integer roleId) {
61
    this.roleId = roleId;
1✔
62
  }
1✔
63

64
  public String getName() {
65
    return name;
1✔
66
  }
67

68
  public void setName(String name) {
69
    this.name = name;
1✔
70
  }
1✔
71

72
  public Integer getDacId() {
73
    return dacId;
1✔
74
  }
75

76
  public void setDacId(Integer dacId) {
77
    this.dacId = dacId;
1✔
78
  }
1✔
79

80
  @Override
81
  public int hashCode() {
82
    return Objects.hashCode(this.userId, this.name, this.dacId);
1✔
83
  }
84

85
  @Override
86
  public boolean equals(Object o) {
87
    if (!(o instanceof UserRole)) {
1✔
88
      return false;
×
89
    }
90
    UserRole otherUserRole = (UserRole) o;
1✔
91
    return Objects.equal(this.getName(), otherUserRole.getName())
1✔
92
        && Objects.equal(this.getDacId(), otherUserRole.getDacId())
1✔
93
        && Objects.equal(this.getUserId(), otherUserRole.getUserId());
1✔
94
  }
95

96
  @Override
97
  public String toString() {
98
    return new Gson().toJson(this);
1✔
99
  }
100

101
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc