1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.datadictionary.validation.constraint;
17
18 import org.kuali.rice.core.api.uif.DataType;
19
20 import javax.xml.bind.annotation.XmlAccessType;
21 import javax.xml.bind.annotation.XmlAccessorType;
22 import javax.xml.bind.annotation.XmlElement;
23
24
25
26
27
28
29
30 @XmlAccessorType(XmlAccessType.FIELD)
31 public class SimpleConstraint extends BaseConstraint implements ExistenceConstraint, RangeConstraint, LengthConstraint{
32
33 @XmlElement
34 private Boolean required;
35
36 @XmlElement
37 private Integer maxLength;
38
39 @XmlElement
40 private Integer minLength;
41
42 @XmlElement
43 protected String exclusiveMin;
44
45 @XmlElement
46 protected String inclusiveMax;
47
48
49 @XmlElement
50 private Integer minOccurs;
51
52 @XmlElement
53 private Integer maxOccurs;
54
55 private DataType dataType;
56
57
58
59
60
61 public Boolean getRequired() {
62 return this.required;
63 }
64
65
66
67
68 public void setRequired(Boolean required) {
69 this.required = required;
70 }
71
72
73
74
75
76 public Integer getMaxLength() {
77 return this.maxLength;
78 }
79
80
81
82
83 public void setMaxLength(Integer maxLength) {
84 this.maxLength = maxLength;
85 }
86
87
88
89
90
91 public Integer getMinLength() {
92 return this.minLength;
93 }
94
95
96
97
98 public void setMinLength(Integer minLength) {
99 this.minLength = minLength;
100 }
101
102
103
104
105
106 public String getExclusiveMin() {
107 return this.exclusiveMin;
108 }
109
110
111
112
113 public void setExclusiveMin(String exclusiveMin) {
114 this.exclusiveMin = exclusiveMin;
115 }
116
117
118
119
120
121 public String getInclusiveMax() {
122 return this.inclusiveMax;
123 }
124
125
126
127
128 public void setInclusiveMax(String inclusiveMax) {
129 this.inclusiveMax = inclusiveMax;
130 }
131
132
133
134
135
136 public Integer getMinOccurs() {
137 return this.minOccurs;
138 }
139
140
141
142
143 public void setMinOccurs(Integer minOccurs) {
144 this.minOccurs = minOccurs;
145 }
146
147
148
149
150
151 public Integer getMaxOccurs() {
152 return this.maxOccurs;
153 }
154
155
156
157
158 public void setMaxOccurs(Integer maxOccurs) {
159 this.maxOccurs = maxOccurs;
160 }
161
162
163
164
165
166 @Override
167 public Boolean isRequired() {
168 return getRequired();
169 }
170
171 public DataType getDataType() {
172 return dataType;
173 }
174
175 public void setDataType(DataType dataType) {
176 this.dataType = dataType;
177 }
178 }
179