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.data.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 private static final long serialVersionUID = -5988843786798202907L;
33
34 private Boolean required;
35 private Integer maxLength;
36 private Integer minLength;
37 private String exclusiveMin;
38 private String inclusiveMax;
39
40
41 private Integer minOccurs;
42 private Integer maxOccurs;
43
44 private DataType dataType;
45
46
47
48
49
50
51 @BeanTagAttribute(name = "required")
52 public Boolean getRequired() {
53 return this.required;
54 }
55
56
57
58
59 public void setRequired(Boolean required) {
60 this.required = required;
61 }
62
63
64
65
66 @Override
67 public Boolean isRequired() {
68 return getRequired();
69 }
70
71
72
73
74
75
76 @BeanTagAttribute(name = "maxLength")
77 public Integer getMaxLength() {
78 return this.maxLength;
79 }
80
81
82
83
84 public void setMaxLength(Integer maxLength) {
85 this.maxLength = maxLength;
86 }
87
88
89
90
91
92
93 @BeanTagAttribute(name = "minLength")
94 public Integer getMinLength() {
95 return this.minLength;
96 }
97
98
99
100
101 public void setMinLength(Integer minLength) {
102 this.minLength = minLength;
103 }
104
105
106
107
108
109
110 @BeanTagAttribute(name = "exclusiveMin")
111 public String getExclusiveMin() {
112 return this.exclusiveMin;
113 }
114
115
116
117
118 public void setExclusiveMin(String exclusiveMin) {
119 this.exclusiveMin = exclusiveMin;
120 }
121
122
123
124
125
126
127 @BeanTagAttribute(name = "inclusiveMax")
128 public String getInclusiveMax() {
129 return this.inclusiveMax;
130 }
131
132
133
134
135 public void setInclusiveMax(String inclusiveMax) {
136 this.inclusiveMax = inclusiveMax;
137 }
138
139
140
141
142
143
144 @BeanTagAttribute(name = "minOccurs")
145 public Integer getMinOccurs() {
146 return this.minOccurs;
147 }
148
149
150
151
152 public void setMinOccurs(Integer minOccurs) {
153 this.minOccurs = minOccurs;
154 }
155
156
157
158
159
160
161 @BeanTagAttribute(name = "maxOccurs")
162 public Integer getMaxOccurs() {
163 return this.maxOccurs;
164 }
165
166
167
168
169 public void setMaxOccurs(Integer maxOccurs) {
170 this.maxOccurs = maxOccurs;
171 }
172
173 @BeanTagAttribute(name = "dataType", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
174 public DataType getDataType() {
175 return dataType;
176 }
177
178 public void setDataType(DataType dataType) {
179 this.dataType = dataType;
180 }
181 }
182