1 package org.kuali.student.common.dictionary.dto;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlElement;
9
10 import org.kuali.student.common.validation.dto.ValidationResultInfo.ErrorLevel;
11
12 @XmlAccessorType(XmlAccessType.FIELD)
13 public class Constraint extends BaseConstraint {
14 public static final String UNBOUNDED = "unbounded";
15 public static final String SINGLE = "1";
16
17 @XmlElement
18 protected boolean serverSide;
19 @XmlElement
20 protected String customValidatorClass;
21 @XmlElement
22 protected String locale;
23 @XmlElement
24 protected String exclusiveMin;
25 @XmlElement
26 protected String inclusiveMax;
27 @XmlElement
28 protected Integer minLength;
29 @XmlElement
30 protected String maxLength;
31 @XmlElement
32 protected ValidCharsConstraint validChars;
33 @XmlElement
34 protected Integer minOccurs;
35 @XmlElement
36 protected String maxOccurs;
37 @XmlElement
38 protected ErrorLevel errorLevel = ErrorLevel.ERROR;
39
40 @XmlElement
41 protected CaseConstraint caseConstraint;
42
43 @XmlElement
44 protected List<RequiredConstraint> requireConstraint;
45
46 @XmlElement
47 protected List<MustOccurConstraint> occursConstraint;
48
49
50 protected LookupConstraint lookupDefinition;
51
52
53
54 protected String lookupContextPath;
55
56
57
58
59 public boolean isServerSide() {
60 return serverSide;
61 }
62
63 public void setServerSide(boolean serverSide) {
64 this.serverSide = serverSide;
65 }
66
67 public String getLocale() {
68 return locale;
69 }
70
71 public void setLocale(String locale) {
72 this.locale = locale;
73 }
74
75 public String getExclusiveMin() {
76 return exclusiveMin;
77 }
78
79 public void setExclusiveMin(String exclusiveMin) {
80 this.exclusiveMin = exclusiveMin;
81 }
82
83 public String getInclusiveMax() {
84 return inclusiveMax;
85 }
86
87 public void setInclusiveMax(String inclusiveMax) {
88 this.inclusiveMax = inclusiveMax;
89 }
90
91 public Integer getMinLength() {
92 return minLength;
93 }
94
95 public void setMinLength(Integer minLength) {
96 this.minLength = minLength;
97 }
98
99 public String getMaxLength() {
100 return maxLength;
101 }
102
103 public void setMaxLength(String maxLength) {
104 this.maxLength = maxLength;
105 }
106
107 public ValidCharsConstraint getValidChars() {
108 return validChars;
109 }
110
111 public void setValidChars(ValidCharsConstraint validChars) {
112 this.validChars = validChars;
113 }
114
115 public Integer getMinOccurs() {
116 return minOccurs;
117 }
118
119 public void setMinOccurs(Integer minOccurs) {
120 this.minOccurs = minOccurs;
121 }
122
123 public String getMaxOccurs() {
124 return maxOccurs;
125 }
126
127 public void setMaxOccurs(String maxOccurs) {
128 this.maxOccurs = maxOccurs;
129 }
130
131 public List<RequiredConstraint> getRequireConstraint() {
132 if(null == requireConstraint) {
133 this.requireConstraint = new ArrayList<RequiredConstraint>();
134 }
135
136 return requireConstraint;
137 }
138
139 public void setRequireConstraint(List<RequiredConstraint> requireConstraint) {
140 this.requireConstraint = requireConstraint;
141 }
142
143 public CaseConstraint getCaseConstraint() {
144 return caseConstraint;
145 }
146
147 public void setCaseConstraint(CaseConstraint caseConstraint) {
148 this.caseConstraint = caseConstraint;
149 }
150
151 public List<MustOccurConstraint> getOccursConstraint() {
152 if(null == occursConstraint) {
153 this.occursConstraint = new ArrayList<MustOccurConstraint>();
154 }
155 return occursConstraint;
156 }
157
158 public void setOccursConstraint(List<MustOccurConstraint> occursConstraint) {
159 this.occursConstraint = occursConstraint;
160 }
161
162 public LookupConstraint getLookupDefinition() {
163 return lookupDefinition;
164 }
165
166 public void setLookupDefinition(LookupConstraint lookupDefinition) {
167 this.lookupDefinition = lookupDefinition;
168 }
169
170 public String getLookupContextPath() {
171 return lookupContextPath;
172 }
173
174 public void setLookupContextPath(String lookupContextPath) {
175 this.lookupContextPath = lookupContextPath;
176 }
177
178 public String getCustomValidatorClass() {
179 return customValidatorClass;
180 }
181
182 public void setCustomValidatorClass(String customValidatorClass) {
183 this.customValidatorClass = customValidatorClass;
184 }
185
186 public ErrorLevel getErrorLevel() {
187 return errorLevel;
188 }
189
190 public void setErrorLevel(ErrorLevel errorLevel) {
191 this.errorLevel = errorLevel;
192 }
193 }