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

openmrs / openmrs-core / 43502855768

13 Nov 2026 08:33PM UTC coverage: 67.328% (+0.4%) from 66.969%
43502855768

push

github

ibacher
TRUNK-6616: Count obs version history statements without the privilege check

getObsVersionHistory_shouldLoadTheWholeChainInTwoQueries counted the
statements of the service call, which include its privilege check. When
test setup has cleared the role privilege cache in the same transaction,
that check reads roles from the database, so the count depended on test
order. Measure the DAO call instead.

26896 of 39948 relevant lines covered (67.33%)

0.67 hits per line

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

93.33
/api/src/main/java/org/openmrs/ConceptNameTag.java
1
/**
2
 * This Source Code Form is subject to the terms of the Mozilla Public License,
3
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
 * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
5
 * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
 *
7
 * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
8
 * graphic logo is a trademark of OpenMRS Inc.
9
 */
10
package org.openmrs;
11

12
import java.util.Date;
13

14
import org.codehaus.jackson.annotate.JsonIgnore;
15
import org.hibernate.envers.Audited;
16

17
/**
18
 * ConceptNameTag is a textual tag which can be applied to a ConceptName.
19
 */
20
@Audited
21
public class ConceptNameTag extends BaseOpenmrsObject implements Auditable, Voidable, java.io.Serializable {
22
        
23
        public static final long serialVersionUID = 33226787L;
24
        
25
        // Fields
26
        private Integer conceptNameTagId;
27
        
28
        private String tag;
29
        
30
        private String description;
31
        
32
        private User creator;
33
        
34
        private Date dateCreated;
35
        
36
        private Boolean voided = false;
1 ✔
37
        
38
        private User voidedBy;
39
        
40
        private Date dateVoided;
41
        
42
        private String voidReason;
43
        
44
        private User changedBy;
45
        
46
        private Date dateChanged;
47
        
48
        // Constructors
49
        
50
        /**
51
         * Default constructor.
52
         */
53
        public ConceptNameTag() {
1 ✔
54
        }
1 ✔
55
        
56
        /**
57
         * Public constructor. Use factory methods to obtain copies of the desired tags.
58
         * 
59
         * @param tag
60
         * @param description
61
         */
62
        public ConceptNameTag(String tag, String description) {
1 ✔
63
                setTag(tag);
1 ✔
64
                setDescription(description);
1 ✔
65
        }
1 ✔
66
        
67
        // Property accessors
68
        
69
        /**
70
         * Returns the textual representation of this ConceptNameTag.
71
         * 
72
         * @return the textual representation of this ConceptNameTag.
73
         */
74
        public String getTag() {
75
                return tag;
1 ✔
76
        }
77
        
78
        /**
79
         * Sets the textual representation of this ConceptNametag.
80
         * 
81
         * @param tag the textual representation
82
         */
83
        public void setTag(String tag) {
84
                this.tag = tag;
1 ✔
85
        }
1 ✔
86
        
87
        /**
88
         * Returns the description of this tag.
89
         * 
90
         * @return the description of this tag
91
         */
92
        public String getDescription() {
93
                return description;
1 ✔
94
        }
95
        
96
        /**
97
         * Sets the description of this tag.
98
         * 
99
         * @param description
100
         */
101
        public void setDescription(String description) {
102
                this.description = description;
1 ✔
103
        }
1 ✔
104
        
105
        /**
106
         * @return Returns the creator.
107
         */
108
        @Override
109
        public User getCreator() {
110
                return creator;
1 ✔
111
        }
112
        
113
        /**
114
         * @param creator The creator to set.
115
         */
116
        @Override
117
        public void setCreator(User creator) {
118
                this.creator = creator;
1 ✔
119
        }
1 ✔
120
        
121
        /**
122
         * @return Returns the dateCreated.
123
         */
124
        @Override
125
        public Date getDateCreated() {
126
                return dateCreated;
1 ✔
127
        }
128
        
129
        /**
130
         * @param dateCreated The dateCreated to set.
131
         */
132
        @Override
133
        public void setDateCreated(Date dateCreated) {
134
                this.dateCreated = dateCreated;
1 ✔
135
        }
1 ✔
136
        
137
        /**
138
         * Returns whether the ConceptName has been voided.
139
         * 
140
         * @return true if the ConceptName has been voided, false otherwise.
141
         * 
142
         * @deprecated as of 2.0, use {@link #getVoided()}
143
         */
144
        @Override
145
        @Deprecated
146
        @JsonIgnore
147
        public Boolean isVoided() {
148
                return getVoided();
×
149
        }
150
        
151
        /**
152
         * Returns whether the ConceptName has been voided.
153
         * 
154
         * @return true if the ConceptName has been voided, false otherwise.
155
         */
156
        @Override
157
        public Boolean getVoided() {
158
                return voided;
1 ✔
159
        }
160
        
161
        /**
162
         * Sets the voided status of the ConceptName.
163
         * 
164
         * @param voided the voided status to set.
165
         */
166
        @Override
167
        public void setVoided(Boolean voided) {
168
                this.voided = voided;
1 ✔
169
        }
1 ✔
170
        
171
        /**
172
         * Returns the User who voided this ConceptName.
173
         * 
174
         * @return the User who voided this ConceptName, or null if not set
175
         */
176
        @Override
177
        public User getVoidedBy() {
178
                return voidedBy;
1 ✔
179
        }
180
        
181
        /**
182
         * Sets the User who voided this ConceptName.
183
         * 
184
         * @param voidedBy the user who voided this ConceptName.
185
         */
186
        @Override
187
        public void setVoidedBy(User voidedBy) {
188
                this.voidedBy = voidedBy;
1 ✔
189
        }
1 ✔
190
        
191
        /**
192
         * Returns the Date this ConceptName was voided.
193
         * 
194
         * @return the Date this ConceptName was voided.
195
         */
196
        @Override
197
        public Date getDateVoided() {
198
                return dateVoided;
1 ✔
199
        }
200
        
201
        /**
202
         * Sets the Data this ConceptName was voided.
203
         * 
204
         * @param dateVoided the date the ConceptName was voided.
205
         */
206
        @Override
207
        public void setDateVoided(Date dateVoided) {
208
                this.dateVoided = dateVoided;
1 ✔
209
        }
1 ✔
210
        
211
        /**
212
         * Returns the reason this ConceptName was voided.
213
         * 
214
         * @return the reason this ConceptName was voided
215
         */
216
        @Override
217
        public String getVoidReason() {
218
                return voidReason;
1 ✔
219
        }
220
        
221
        /**
222
         * Sets the reason this ConceptName was voided.
223
         * 
224
         * @param voidReason the reason this ConceptName was voided
225
         */
226
        @Override
227
        public void setVoidReason(String voidReason) {
228
                this.voidReason = voidReason;
1 ✔
229
        }
1 ✔
230
        
231
        @Override
232
        public String toString() {
233
                return this.tag;
1 ✔
234
        }
235
        
236
        /**
237
         * @return the conceptNameTagId
238
         */
239
        public Integer getConceptNameTagId() {
240
                return conceptNameTagId;
1 ✔
241
        }
242
        
243
        /**
244
         * @param conceptNameTagId the conceptNameTagId to set
245
         */
246
        public void setConceptNameTagId(Integer conceptNameTagId) {
247
                this.conceptNameTagId = conceptNameTagId;
1 ✔
248
        }
1 ✔
249
        
250
        /**
251
         * @since 1.5
252
         * @see org.openmrs.OpenmrsObject#getId()
253
         */
254
        @Override
255
        public Integer getId() {
256
                return getConceptNameTagId();
1 ✔
257
        }
258
        
259
        /**
260
         * @since 1.5
261
         * @see org.openmrs.OpenmrsObject#setId(java.lang.Integer)
262
         */
263
        @Override
264
        public void setId(Integer id) {
265
                setConceptNameTagId(id);
×
266
        }
×
267
        
268
        /**
269
         * @return Returns the changedBy.
270
         */
271
        @Override
272
        public User getChangedBy() {
273
                return changedBy;
1 ✔
274
        }
275
        
276
        /**
277
         * @param changedBy The user that changed this object
278
         */
279
        @Override
280
        public void setChangedBy(User changedBy) {
281
                this.changedBy = changedBy;
1 ✔
282
        }
1 ✔
283
        
284
        /**
285
         * @return Returns the date this object was changed
286
         */
287
        @Override
288
        public Date getDateChanged() {
289
                return dateChanged;
1 ✔
290
        }
291
        
292
        /**
293
         * @param dateChanged The date this object was changed
294
         */
295
        @Override
296
        public void setDateChanged(Date dateChanged) {
297
                this.dateChanged = dateChanged;
1 ✔
298
        }
1 ✔
299
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc