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 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
20 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
21 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
22
23
24
25
26
27
28
29 @BeanTags({@BeanTag(name = "simpleContraint", parent = "SimpleConstraint"),
30 @BeanTag(name = "requiredConstraint", parent = "RequiredConstraint")})
31 public class SimpleConstraint extends BaseConstraint implements ExistenceConstraint, RangeConstraint, LengthConstraint {
32
33 private Boolean required;
34 private Integer maxLength;
35 private Integer minLength;
36 private String exclusiveMin;
37 private String inclusiveMax;
38
39
40 private Integer minOccurs;
41 private Integer maxOccurs;
42
43 private DataType dataType;
44
45
46
47
48
49
50 @BeanTagAttribute(name = "required")
51 public Boolean getRequired() {
52 return this.required;
53 }
54
55
56
57
58 public void setRequired(Boolean required) {
59 this.required = required;
60 }
61
62
63
64
65 @Override
66 public Boolean isRequired() {
67 return getRequired();
68 }
69
70
71
72
73
74
75 @BeanTagAttribute(name = "maxLength")
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
92 @BeanTagAttribute(name = "minLength")
93 public Integer getMinLength() {
94 return this.minLength;
95 }
96
97
98
99
100 public void setMinLength(Integer minLength) {
101 this.minLength = minLength;
102 }
103
104
105
106
107
108
109 @BeanTagAttribute(name = "exclusiveMin")
110 public String getExclusiveMin() {
111 return this.exclusiveMin;
112 }
113
114
115
116
117 public void setExclusiveMin(String exclusiveMin) {
118 this.exclusiveMin = exclusiveMin;
119 }
120
121
122
123
124
125
126 @BeanTagAttribute(name = "inclusiveMax")
127 public String getInclusiveMax() {
128 return this.inclusiveMax;
129 }
130
131
132
133
134 public void setInclusiveMax(String inclusiveMax) {
135 this.inclusiveMax = inclusiveMax;
136 }
137
138
139
140
141
142
143 @BeanTagAttribute(name = "minOccurs")
144 public Integer getMinOccurs() {
145 return this.minOccurs;
146 }
147
148
149
150
151 public void setMinOccurs(Integer minOccurs) {
152 this.minOccurs = minOccurs;
153 }
154
155
156
157
158
159
160 @BeanTagAttribute(name = "maxOccurs")
161 public Integer getMaxOccurs() {
162 return this.maxOccurs;
163 }
164
165
166
167
168 public void setMaxOccurs(Integer maxOccurs) {
169 this.maxOccurs = maxOccurs;
170 }
171
172 @BeanTagAttribute(name = "dataType", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
173 public DataType getDataType() {
174 return dataType;
175 }
176
177 public void setDataType(DataType dataType) {
178 this.dataType = dataType;
179 }
180 }
181