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

DataBiosphere / consent / #5636

08 Apr 2025 02:19PM UTC coverage: 79.133% (-0.1%) from 79.273%
#5636

push

web-flow
DT-1424: Mark datasets as indexed/deindexed when indexing operations are called (#2470)

58 of 83 new or added lines in 10 files covered. (69.88%)

10 existing lines in 3 files now uncovered.

10277 of 12987 relevant lines covered (79.13%)

0.79 hits per line

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

80.33
/src/main/java/org/broadinstitute/consent/http/models/DatasetProperty.java
1
package org.broadinstitute.consent.http.models;
2

3
import com.google.common.base.Objects;
4
import java.util.Date;
5
import org.broadinstitute.consent.http.enumeration.PropertyType;
6

7
public class DatasetProperty {
8

9
  private Integer propertyId;
10
  private Integer datasetId;
11
  private Integer propertyKey;
12
  private String propertyName;
13
  private Object propertyValue;
14
  private Date createDate;
15
  private String schemaProperty;
16
  private PropertyType propertyType;
17

18
  public DatasetProperty() {
1✔
19
  }
1✔
20

21
  @Deprecated
22
  public DatasetProperty(Integer propertyId,
23
      Integer datasetId,
24
      Integer propertyKey,
25
      String propertyValue,
26
      PropertyType type,
27
      Date createDate) {
28
    this(datasetId, propertyKey, propertyValue, type, createDate);
×
29
    this.propertyId = propertyId;
×
30
  }
×
31

32
  @Deprecated
33
  public DatasetProperty(Integer datasetId,
34
      Integer propertyKey,
35
      String propertyValue,
36
      PropertyType type,
UNCOV
37
      Date createDate) {
×
UNCOV
38
    this.datasetId = datasetId;
×
UNCOV
39
    this.propertyKey = propertyKey;
×
UNCOV
40
    this.propertyValue = type.coerce(propertyValue);
×
UNCOV
41
    this.propertyType = type;
×
UNCOV
42
    this.createDate = createDate;
×
UNCOV
43
  }
×
44

45
  public DatasetProperty(Integer propertyId,
46
      Integer datasetId,
47
      Integer propertyKey,
48
      String schemaProperty,
49
      String propertyValue,
50
      PropertyType type,
51
      Date createDate) {
52
    this(datasetId, propertyKey, schemaProperty, propertyValue, type, createDate);
1✔
53
    this.propertyId = propertyId;
1✔
54
  }
1✔
55

56
  public DatasetProperty(Integer datasetId,
57
      Integer propertyKey,
58
      String schemaProperty,
59
      String propertyValue,
60
      PropertyType type,
61
      Date createDate) {
1✔
62
    this.datasetId = datasetId;
1✔
63
    this.propertyKey = propertyKey;
1✔
64
    this.propertyValue = type.coerce(propertyValue);
1✔
65
    this.propertyType = type;
1✔
66
    this.createDate = createDate;
1✔
67
    this.schemaProperty = schemaProperty;
1✔
68
  }
1✔
69

70
  public Integer getPropertyId() {
71
    return propertyId;
1✔
72
  }
73

74
  public void setPropertyId(Integer propertyId) {
75
    this.propertyId = propertyId;
1✔
76
  }
1✔
77

78
  public Integer getDatasetId() {
79
    return datasetId;
1✔
80
  }
81

82
  public void setDatasetId(Integer datasetId) {
83
    this.datasetId = datasetId;
1✔
84
  }
1✔
85

86
  public Integer getPropertyKey() {
87
    return propertyKey;
1✔
88
  }
89

90
  public void setPropertyKey(Integer propertyKey) {
91
    this.propertyKey = propertyKey;
1✔
92
  }
1✔
93

94
  public String getPropertyName() {
95
    return propertyName;
1✔
96
  }
97

98
  public void setPropertyName(String propertyName) {
99
    this.propertyName = propertyName;
1✔
100
  }
1✔
101

102
  public String getSchemaProperty() {
103
    return this.schemaProperty;
1✔
104
  }
105

106
  public void setSchemaProperty(String schemaProperty) {
107
    this.schemaProperty = schemaProperty;
1✔
108
  }
1✔
109

110
  public Object getPropertyValue() {
111
    return propertyValue;
1✔
112
  }
113

114
  public String getPropertyValueAsString() {
115
    return this.propertyValue.toString();
1✔
116
  }
117

118
  public void setPropertyValue(Object propertyValue) {
119
    this.propertyValue = propertyValue;
1✔
120
  }
1✔
121

122
  public void setPropertyValueAsString(String propertyValue) {
123
    this.propertyValue = propertyType.coerce(propertyValue);
1✔
124
  }
1✔
125

126
  public Date getCreateDate() {
127
    return createDate;
1✔
128
  }
129

130
  public void setCreateDate(Date createDate) {
131
    this.createDate = createDate;
1✔
132
  }
1✔
133

134
  public PropertyType getPropertyType() {
135
    if (java.util.Objects.isNull(this.propertyType)) {
1✔
136
      return PropertyType.String;
1✔
137
    }
138

139
    return this.propertyType;
1✔
140
  }
141

142
  public String getPropertyTypeAsString() {
143
    return this.getPropertyType().toString();
1✔
144
  }
145

146
  public void setPropertyType(PropertyType propertyType) {
147
    this.propertyType = propertyType;
1✔
148
  }
1✔
149

150
  @Override
151
  public boolean equals(Object o) {
152
    if (this == o) {
1✔
153
      return true;
×
154
    }
155
    if (o == null || getClass() != o.getClass()) {
1✔
156
      return false;
×
157
    }
158
    DatasetProperty that = (DatasetProperty) o;
1✔
159
    return Objects.equal(datasetId, that.datasetId) && Objects.equal(propertyName,
1✔
160
        that.propertyName) && Objects.equal(propertyValue, that.propertyValue);
1✔
161
  }
162

163
  @Override
164
  public int hashCode() {
165
    return Objects.hashCode(datasetId, propertyName, propertyValue);
1✔
166
  }
167
}
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