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

openmrs / openmrs-core / 8583110103

06 Apr 2024 06:40PM CUT coverage: 64.691%. Remained the same
8583110103

push

github

web-flow
maven(deps): bump org.apache.maven.plugins:maven-source-plugin (#4612)

Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.3.1.
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

22762 of 35186 relevant lines covered (64.69%)

0.65 hits per line

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

69.05
/api/src/main/java/org/openmrs/Field.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.HashSet;
13
import java.util.Set;
14

15
import org.codehaus.jackson.annotate.JsonIgnore;
16

17
/**
18
 * Field
19
 *
20
 * @version 1.0
21
 */
22
public class Field extends BaseChangeableOpenmrsMetadata {
23
        
24
        public static final long serialVersionUID = 4454L;
25
        
26
        // Fields
27
        
28
        private Integer fieldId;
29
        
30
        private FieldType fieldType;
31
        
32
        private Concept concept;
33
        
34
        private String tableName;
35
        
36
        private String attributeName;
37
        
38
        private String defaultValue;
39
        
40
        private Boolean selectMultiple = false;
1✔
41
        
42
        private Set<FieldAnswer> answers;
43
        
44
        // Constructors
45
        
46
        /** default constructor */
47
        public Field() {
1✔
48
        }
1✔
49
        
50
        /** constructor with id */
51
        public Field(Integer fieldId) {
1✔
52
                this.fieldId = fieldId;
1✔
53
        }
1✔
54
        
55
        // Property accessors
56
        
57
        /**
58
         * @return Returns the fieldId.
59
         */
60
        public Integer getFieldId() {
61
                return fieldId;
1✔
62
        }
63
        
64
        /**
65
         * @param fieldId The fieldId to set.
66
         */
67
        public void setFieldId(Integer fieldId) {
68
                this.fieldId = fieldId;
1✔
69
        }
1✔
70
        
71
        /**
72
         * @return Returns the fieldType.
73
         */
74
        public FieldType getFieldType() {
75
                return fieldType;
1✔
76
        }
77
        
78
        /**
79
         * @param fieldType The fieldType to set.
80
         */
81
        public void setFieldType(FieldType fieldType) {
82
                this.fieldType = fieldType;
1✔
83
        }
1✔
84
        
85
        /**
86
         * @return Returns the concept.
87
         */
88
        public Concept getConcept() {
89
                return concept;
1✔
90
        }
91
        
92
        /**
93
         * @param concept The concept to set.
94
         */
95
        public void setConcept(Concept concept) {
96
                this.concept = concept;
1✔
97
        }
1✔
98
        
99
        /**
100
         * @return Returns the tableName.
101
         */
102
        public String getTableName() {
103
                return tableName;
1✔
104
        }
105
        
106
        /**
107
         * @param tableName The tableName to set.
108
         */
109
        public void setTableName(String tableName) {
110
                this.tableName = tableName;
1✔
111
        }
1✔
112
        
113
        /**
114
         * @return Returns the attributeName.
115
         */
116
        public String getAttributeName() {
117
                return attributeName;
1✔
118
        }
119
        
120
        /**
121
         * @param attributeName The attributeName to set.
122
         */
123
        public void setAttributeName(String attributeName) {
124
                this.attributeName = attributeName;
1✔
125
        }
1✔
126
        
127
        /**
128
         * @return Returns the default value.
129
         */
130
        public String getDefaultValue() {
131
                return defaultValue;
1✔
132
        }
133
        
134
        /**
135
         * @param defaultValue The defaultValue to set.
136
         */
137
        public void setDefaultValue(String defaultValue) {
138
                this.defaultValue = defaultValue;
1✔
139
        }
1✔
140
        
141
        /**
142
         * @deprecated as of 2.0, use {@link #getSelectMultiple()}
143
         */
144
        @Deprecated
145
        @JsonIgnore
146
        public Boolean isSelectMultiple() {
147
                return getSelectMultiple();
×
148
        }
149
        
150
        /**
151
         * @return Returns the selectMultiple.
152
         */
153
        public Boolean getSelectMultiple() {
154
                return selectMultiple;
1✔
155
        }
156
        
157
        /**
158
         * @param selectMultiple The selectMultiple to set.
159
         */
160
        public void setSelectMultiple(Boolean selectMultiple) {
161
                this.selectMultiple = selectMultiple;
1✔
162
        }
1✔
163
        
164
        /**
165
         * @return Returns the fieldAnswers.
166
         */
167
        public Set<FieldAnswer> getAnswers() {
168
                return answers;
1✔
169
        }
170
        
171
        /**
172
         * @param fieldAnswers The fieldAnswers to set.
173
         */
174
        public void setAnswers(Set<FieldAnswer> fieldAnswers) {
175
                this.answers = fieldAnswers;
×
176
        }
×
177
        
178
        /**
179
         * Adds a field answer to the list of field answers
180
         *
181
         * @param fieldAnswer FieldAnswer to be added
182
         */
183
        public void addAnswer(FieldAnswer fieldAnswer) {
184
                if (answers == null) {
×
185
                        answers = new HashSet<>();
×
186
                }
187
                if (!answers.contains(fieldAnswer) && fieldAnswer != null) {
×
188
                        answers.add(fieldAnswer);
×
189
                }
190
        }
×
191
        
192
        /**
193
         * Removes a field answer from the list of field answers
194
         *
195
         * @param fieldAnswer FieldAnswer to be removed
196
         */
197
        public void removeAnswer(FieldAnswer fieldAnswer) {
198
                if (answers != null) {
×
199
                        answers.remove(fieldAnswer);
×
200
                }
201
        }
×
202
        
203
        /**
204
         * @since 1.5
205
         * @see org.openmrs.OpenmrsObject#getId()
206
         */
207
        @Override
208
        public Integer getId() {
209
                
210
                return getFieldId();
1✔
211
        }
212
        
213
        /**
214
         * @since 1.5
215
         * @see org.openmrs.OpenmrsObject#setId(java.lang.Integer)
216
         */
217
        @Override
218
        public void setId(Integer id) {
219
                setFieldId(id);
×
220
                
221
        }
×
222
        
223
}
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

© 2025 Coveralls, Inc