| 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 | 0 |  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 | 0 |          @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 | 0 |                  return serverSide; | 
  | 61 |  |          } | 
  | 62 |  |   | 
  | 63 |  |          public void setServerSide(boolean serverSide) { | 
  | 64 | 0 |                  this.serverSide = serverSide; | 
  | 65 | 0 |          } | 
  | 66 |  |   | 
  | 67 |  |          public String getLocale() { | 
  | 68 | 0 |                  return locale; | 
  | 69 |  |          } | 
  | 70 |  |   | 
  | 71 |  |          public void setLocale(String locale) { | 
  | 72 | 0 |                  this.locale = locale; | 
  | 73 | 0 |          } | 
  | 74 |  |   | 
  | 75 |  |          public String getExclusiveMin() { | 
  | 76 | 0 |                  return exclusiveMin; | 
  | 77 |  |          } | 
  | 78 |  |   | 
  | 79 |  |          public void setExclusiveMin(String exclusiveMin) { | 
  | 80 | 0 |                  this.exclusiveMin = exclusiveMin; | 
  | 81 | 0 |          } | 
  | 82 |  |   | 
  | 83 |  |          public String getInclusiveMax() { | 
  | 84 | 0 |                  return inclusiveMax; | 
  | 85 |  |          } | 
  | 86 |  |   | 
  | 87 |  |          public void setInclusiveMax(String inclusiveMax) { | 
  | 88 | 0 |                  this.inclusiveMax = inclusiveMax; | 
  | 89 | 0 |          } | 
  | 90 |  |   | 
  | 91 |  |          public Integer getMinLength() { | 
  | 92 | 0 |                  return minLength; | 
  | 93 |  |          } | 
  | 94 |  |   | 
  | 95 |  |          public void setMinLength(Integer minLength) { | 
  | 96 | 0 |                  this.minLength = minLength; | 
  | 97 | 0 |          } | 
  | 98 |  |   | 
  | 99 |  |          public String getMaxLength() { | 
  | 100 | 0 |                  return maxLength; | 
  | 101 |  |          } | 
  | 102 |  |   | 
  | 103 |  |          public void setMaxLength(String maxLength) { | 
  | 104 | 0 |                  this.maxLength = maxLength; | 
  | 105 | 0 |          } | 
  | 106 |  |   | 
  | 107 |  |          public ValidCharsConstraint getValidChars() { | 
  | 108 | 0 |                  return validChars; | 
  | 109 |  |          } | 
  | 110 |  |   | 
  | 111 |  |          public void setValidChars(ValidCharsConstraint validChars) { | 
  | 112 | 0 |                  this.validChars = validChars; | 
  | 113 | 0 |          } | 
  | 114 |  |   | 
  | 115 |  |          public Integer getMinOccurs() { | 
  | 116 | 0 |                  return minOccurs; | 
  | 117 |  |          } | 
  | 118 |  |   | 
  | 119 |  |          public void setMinOccurs(Integer minOccurs) { | 
  | 120 | 0 |                  this.minOccurs = minOccurs; | 
  | 121 | 0 |          } | 
  | 122 |  |   | 
  | 123 |  |          public String getMaxOccurs() { | 
  | 124 | 0 |                  return maxOccurs; | 
  | 125 |  |          } | 
  | 126 |  |   | 
  | 127 |  |          public void setMaxOccurs(String maxOccurs) { | 
  | 128 | 0 |                  this.maxOccurs = maxOccurs; | 
  | 129 | 0 |          } | 
  | 130 |  |   | 
  | 131 |  |          public List<RequiredConstraint> getRequireConstraint() { | 
  | 132 | 0 |          if(null == requireConstraint) { | 
  | 133 | 0 |              this.requireConstraint = new ArrayList<RequiredConstraint>(); | 
  | 134 |  |          } | 
  | 135 |  |   | 
  | 136 | 0 |              return requireConstraint; | 
  | 137 |  |          } | 
  | 138 |  |   | 
  | 139 |  |          public void setRequireConstraint(List<RequiredConstraint> requireConstraint) { | 
  | 140 | 0 |              this.requireConstraint = requireConstraint; | 
  | 141 | 0 |          } | 
  | 142 |  |   | 
  | 143 |  |      public CaseConstraint getCaseConstraint() { | 
  | 144 | 0 |          return caseConstraint; | 
  | 145 |  |      } | 
  | 146 |  |   | 
  | 147 |  |      public void setCaseConstraint(CaseConstraint caseConstraint) { | 
  | 148 | 0 |          this.caseConstraint = caseConstraint; | 
  | 149 | 0 |      } | 
  | 150 |  |   | 
  | 151 |  |      public List<MustOccurConstraint> getOccursConstraint() { | 
  | 152 | 0 |          if(null == occursConstraint) { | 
  | 153 | 0 |              this.occursConstraint = new ArrayList<MustOccurConstraint>(); | 
  | 154 |  |          } | 
  | 155 | 0 |                  return occursConstraint; | 
  | 156 |  |          } | 
  | 157 |  |   | 
  | 158 |  |          public void setOccursConstraint(List<MustOccurConstraint> occursConstraint) { | 
  | 159 | 0 |                  this.occursConstraint = occursConstraint; | 
  | 160 | 0 |          } | 
  | 161 |  |   | 
  | 162 |  |          public LookupConstraint getLookupDefinition() { | 
  | 163 | 0 |                  return lookupDefinition; | 
  | 164 |  |          } | 
  | 165 |  |   | 
  | 166 |  |          public void setLookupDefinition(LookupConstraint lookupDefinition) { | 
  | 167 | 0 |                  this.lookupDefinition = lookupDefinition; | 
  | 168 | 0 |          } | 
  | 169 |  |   | 
  | 170 |  |          public String getLookupContextPath() { | 
  | 171 | 0 |                  return lookupContextPath; | 
  | 172 |  |          } | 
  | 173 |  |   | 
  | 174 |  |          public void setLookupContextPath(String lookupContextPath) { | 
  | 175 | 0 |                  this.lookupContextPath = lookupContextPath; | 
  | 176 | 0 |          } | 
  | 177 |  |   | 
  | 178 |  |          public String getCustomValidatorClass() { | 
  | 179 | 0 |                  return customValidatorClass; | 
  | 180 |  |          } | 
  | 181 |  |   | 
  | 182 |  |          public void setCustomValidatorClass(String customValidatorClass) { | 
  | 183 | 0 |                  this.customValidatorClass = customValidatorClass; | 
  | 184 | 0 |          } | 
  | 185 |  |   | 
  | 186 |  |          public ErrorLevel getErrorLevel() { | 
  | 187 | 0 |                  return errorLevel; | 
  | 188 |  |          } | 
  | 189 |  |   | 
  | 190 |  |          public void setErrorLevel(ErrorLevel errorLevel) { | 
  | 191 | 0 |                  this.errorLevel = errorLevel; | 
  | 192 | 0 |          }         | 
  | 193 |  |  } |