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

DataBiosphere / consent / #5301

26 Aug 2024 05:53PM UTC coverage: 78.013% (-0.03%) from 78.038%
#5301

push

web-flow
DCJ-630: Remove deprecated and unused create dataset endpoint (#2385)

10077 of 12917 relevant lines covered (78.01%)

0.78 hits per line

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

60.87
/src/main/java/org/broadinstitute/consent/http/models/dto/DatasetDTO.java
1
package org.broadinstitute.consent.http.models.dto;
2

3
import com.fasterxml.jackson.annotation.JsonProperty;
4
import java.sql.Date;
5
import java.sql.Timestamp;
6
import java.util.ArrayList;
7
import java.util.List;
8
import java.util.Objects;
9
import org.broadinstitute.consent.http.models.DataUse;
10
import org.broadinstitute.consent.http.models.Dataset;
11

12
@Deprecated
13
public class DatasetDTO {
14

15
  @JsonProperty
16
  private String datasetName;
17

18
  @JsonProperty
19
  private Integer dacId;
20

21
  @JsonProperty
22
  private Integer dataSetId;
23

24
  @JsonProperty
25
  private String consentId;
26

27
  @JsonProperty
28
  private Boolean deletable;
29

30
  @JsonProperty
31
  private List<DatasetPropertyDTO> properties;
32

33
  @JsonProperty
34
  private Boolean active;
35

36
  @JsonProperty
37
  private Boolean needsApproval;
38

39
  @JsonProperty
40
  private Boolean isAssociatedToDataOwners;
41

42
  @JsonProperty
43
  private Boolean updateAssociationToDataOwnerAllowed;
44

45
  @JsonProperty
46
  private String alias;
47

48
  @JsonProperty
49
  private String objectId;
50

51
  @JsonProperty
52
  private Date createDate;
53

54
  @JsonProperty
55
  private Integer createUserId;
56

57
  @JsonProperty
58
  private Timestamp updateDate;
59

60
  @JsonProperty
61
  private Integer updateUserId;
62

63
  @JsonProperty
64
  public DataUse dataUse;
65

66
  public DatasetDTO() {
1✔
67
  }
1✔
68

69
  public String getDatasetName() {
70
    return datasetName;
1✔
71
  }
72

73
  public void setDatasetName(String datasetName) {
74
    this.datasetName = datasetName;
1✔
75
  }
1✔
76

77
  public Integer getDacId() {
78
    return dacId;
1✔
79
  }
80

81
  public void setDacId(Integer dacId) {
82
    this.dacId = dacId;
1✔
83
  }
1✔
84

85
  public DatasetDTO(List<DatasetPropertyDTO> properties) {
1✔
86
    this.properties = properties;
1✔
87
  }
1✔
88

89
  public String getConsentId() {
90
    return consentId;
1✔
91
  }
92

93
  public void setConsentId(String consentId) {
94
    this.consentId = consentId;
×
95
  }
×
96

97
  public Boolean getDeletable() {
98
    return deletable;
×
99
  }
100

101
  public void setDeletable(Boolean deletable) {
102
    this.deletable = deletable;
×
103
  }
×
104

105
  public String getPropertyValue(String propertyName) {
106
    return properties.get(properties.indexOf(new DatasetPropertyDTO(propertyName, "")))
×
107
        .getPropertyValue();
×
108
  }
109

110
  public List<DatasetPropertyDTO> getProperties() {
111
    return properties;
1✔
112
  }
113

114
  public void setProperties(List<DatasetPropertyDTO> properties) {
115
    this.properties = properties;
1✔
116
  }
1✔
117

118
  public Boolean getActive() {
119
    return active;
×
120
  }
121

122
  public void setActive(Boolean active) {
123
    this.active = active;
×
124
  }
×
125

126
  public Boolean getNeedsApproval() {
127
    return needsApproval;
×
128
  }
129

130
  public void setNeedsApproval(Boolean needsApproval) {
131
    this.needsApproval = needsApproval;
×
132
  }
×
133

134
  public Boolean getIsAssociatedToDataOwners() {
135
    return isAssociatedToDataOwners;
×
136
  }
137

138
  public void setIsAssociatedToDataOwners(Boolean isAssociatedToDataOwners) {
139
    this.isAssociatedToDataOwners = isAssociatedToDataOwners;
×
140
  }
×
141

142
  public Boolean getUpdateAssociationToDataOwnerAllowed() {
143
    return updateAssociationToDataOwnerAllowed;
×
144
  }
145

146
  public void setUpdateAssociationToDataOwnerAllowed(Boolean updateAssociationToDataOwnerAllowed) {
147
    this.updateAssociationToDataOwnerAllowed = updateAssociationToDataOwnerAllowed;
×
148
  }
×
149

150
  public void setDataSetId(Integer dataSetId) {
151
    this.dataSetId = dataSetId;
1✔
152
  }
1✔
153

154
  public Integer getDataSetId() {
155
    return dataSetId;
1✔
156
  }
157

158
  public void setAlias(Integer alias) {
159
    this.alias = Dataset.parseAliasToIdentifier(alias);
1✔
160
  }
1✔
161

162
  public String getAlias() {
163
    return alias;
×
164
  }
165

166
  public String getObjectId() {
167
    return objectId;
×
168
  }
169

170
  public void setObjectId(String objectId) {
171
    this.objectId = objectId;
1✔
172
  }
1✔
173

174
  public Date getCreateDate() {
175
    return createDate;
×
176
  }
177

178
  public void setCreateDate(Date createDate) {
179
    this.createDate = createDate;
1✔
180
  }
1✔
181

182
  public Integer getCreateUserId() {
183
    return createUserId;
×
184
  }
185

186
  public void setCreateUserId(Integer createUserId) {
187
    this.createUserId = createUserId;
1✔
188
  }
1✔
189

190
  public Timestamp getUpdateDate() {
191
    return updateDate;
×
192
  }
193

194
  public void setUpdateDate(Timestamp updateDate) {
195
    this.updateDate = updateDate;
1✔
196
  }
1✔
197

198
  public Integer getUpdateUserId() {
199
    return updateUserId;
×
200
  }
201

202
  public void setUpdateUserId(Integer updateUserId) {
203
    this.updateUserId = updateUserId;
1✔
204
  }
1✔
205

206
  public void addProperty(DatasetPropertyDTO property) {
207
    if (this.getProperties() == null) {
1✔
208
      this.setProperties(new ArrayList<>());
1✔
209
    }
210
    this.getProperties().add(property);
1✔
211
  }
1✔
212

213
  public DataUse getDataUse() {
214
    return dataUse;
×
215
  }
216

217
  public void setDataUse(DataUse dataUse) {
218
    this.dataUse = dataUse;
1✔
219
  }
1✔
220

221
  @Override
222
  public boolean equals(Object o) {
223
    if (this == o) {
1✔
224
      return true;
1✔
225
    }
226
    if (o == null || getClass() != o.getClass()) {
1✔
227
      return false;
×
228
    }
229
    DatasetDTO that = (DatasetDTO) o;
1✔
230
    return dataSetId.equals(that.dataSetId);
1✔
231
  }
232

233
  @Override
234
  public int hashCode() {
235
    return Objects.hash(dataSetId);
1✔
236
  }
237
}
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