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

openmrs / openmrs-core / 15205088843

23 May 2025 07:43AM UTC coverage: 65.083% (+0.01%) from 65.069%
15205088843

push

github

rkorytkowski
TRUNK-6300: Adding Windows test, cleaning up logs, adjusting variable name

2 of 2 new or added lines in 2 files covered. (100.0%)

336 existing lines in 18 files now uncovered.

23379 of 35922 relevant lines covered (65.08%)

0.65 hits per line

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

87.5
/api/src/main/java/org/openmrs/Privilege.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 javax.persistence.Cacheable;
13

14
import org.hibernate.annotations.Cache;
15
import org.hibernate.annotations.CacheConcurrencyStrategy;
16
import org.hibernate.envers.Audited;
17

18
/**
19
 * Privilege
20
 * 
21
 * @version 1.0
22
 */
23
@Audited
24
@Cacheable
25
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
26
public class Privilege extends BaseChangeableOpenmrsMetadata {
27
        
28
        public static final long serialVersionUID = 312L;
29
        
30
        // Fields
31
        
32
        private String privilege;
33
        
34
        // Constructors
35
        
36
        /** default constructor */
37
        public Privilege() {
1✔
38
        }
1✔
39
        
40
        /** constructor with id */
41
        public Privilege(String privilege) {
1✔
42
                this.privilege = privilege;
1✔
43
        }
1✔
44
        
45
        public Privilege(String privilege, String description) {
1✔
46
                this.privilege = privilege;
1✔
47
                setDescription(description);
1✔
48
        }
1✔
49
        
50
        // Property accessors
51
        
52
        /**
53
         * @return Returns the privilege.
54
         */
55
        public String getPrivilege() {
56
                return privilege;
1✔
57
        }
58
        
59
        /**
60
         * @param privilege The privilege to set.
61
         */
62
        public void setPrivilege(String privilege) {
63
                this.privilege = privilege;
1✔
64
        }
1✔
65
        
66
        @Override
67
        public String getName() {
68
                return this.getPrivilege();
1✔
69
        }
70
        
71
        /**
72
         * @see java.lang.Object#toString()
73
         */
74
        @Override
75
        public String toString() {
76
                return this.privilege;
1✔
77
        }
78
        
79
        /**
80
         * @since 1.5
81
         * @see org.openmrs.OpenmrsObject#getId()
82
         */
83
        @Override
84
        public Integer getId() {
UNCOV
85
                throw new UnsupportedOperationException();
×
86
                
87
        }
88
        
89
        /**
90
         * @since 1.5
91
         * @see org.openmrs.OpenmrsObject#setId(java.lang.Integer)
92
         */
93
        @Override
94
        public void setId(Integer id) {
UNCOV
95
                throw new UnsupportedOperationException();
×
96
                
97
        }
98
}
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