| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.student.lum.common.client.widgets; | 
  | 17 |  |   | 
  | 18 |  |  import java.util.Date; | 
  | 19 |  |   | 
  | 20 |  |  import org.kuali.student.common.assembly.data.Data; | 
  | 21 |  |  import org.kuali.student.common.assembly.helper.PropertyEnum; | 
  | 22 |  |  import org.kuali.student.lum.common.client.lo.MetaInfoHelper; | 
  | 23 |  |   | 
  | 24 |  |  public class CluSetHelper { | 
  | 25 |  |   | 
  | 26 |  |      private static final long serialVersionUID = 1; | 
  | 27 |  |   | 
  | 28 | 0 |      public enum Properties implements PropertyEnum | 
  | 29 |  |      { | 
  | 30 | 0 |          ID ("id"), | 
  | 31 | 0 |          ORGANIZATION ("organization"), | 
  | 32 | 0 |          DESCRIPTION ("description"), | 
  | 33 | 0 |          EFFECTIVE_DATE ("effectiveDate"), | 
  | 34 | 0 |          EXPIRATION_DATE ("expirationDate"), | 
  | 35 | 0 |          APPROVED_CLUS ("approvedClus"), | 
  | 36 | 0 |          PROPOSED_CLUS ("proposedClus"), | 
  | 37 |  |           | 
  | 38 | 0 |          ALL_CLUS ("allClus"), | 
  | 39 | 0 |          CLUSETS ("clusets"), | 
  | 40 | 0 |          CLU_SET_RANGE ("clusetRange"), | 
  | 41 | 0 |          CLU_SET_RANGE_VIEW_DETAILS ("cluSetRangeViewDetails"), | 
  | 42 | 0 |          META_INFO ("metaInfo"), | 
  | 43 | 0 |          NAME ("name"), | 
  | 44 | 0 |          STATE ("state"), | 
  | 45 | 0 |          TYPE ("type"), | 
  | 46 | 0 |          REUSABLE ("reusable"), | 
  | 47 | 0 |          REFERENCEABLE ("referenceable"); | 
  | 48 |  |   | 
  | 49 |  |          private final String key; | 
  | 50 |  |   | 
  | 51 | 0 |          private Properties (final String key) { | 
  | 52 | 0 |              this.key = key; | 
  | 53 | 0 |          } | 
  | 54 |  |   | 
  | 55 |  |          @Override | 
  | 56 |  |          public String getKey() { | 
  | 57 | 0 |              return this.key; | 
  | 58 |  |          } | 
  | 59 |  |      } | 
  | 60 |  |      private Data data; | 
  | 61 |  |   | 
  | 62 | 0 |      public CluSetHelper(Data data) { | 
  | 63 | 0 |          this.data = data; | 
  | 64 | 0 |      } | 
  | 65 |  |   | 
  | 66 |  |      public static CluSetHelper wrap(Data data) { | 
  | 67 | 0 |          if (data == null) { | 
  | 68 | 0 |              return null; | 
  | 69 |  |          } | 
  | 70 | 0 |          return new CluSetHelper(data); | 
  | 71 |  |      } | 
  | 72 |  |   | 
  | 73 |  |      public Data getData() { | 
  | 74 | 0 |          return this.data; | 
  | 75 |  |      } | 
  | 76 |  |   | 
  | 77 |  |      public void setId(String value) { | 
  | 78 | 0 |          data.set(Properties.ID.getKey(), value); | 
  | 79 | 0 |      } | 
  | 80 |  |   | 
  | 81 |  |      public String getId() { | 
  | 82 | 0 |          return (String) data.get(Properties.ID.getKey()); | 
  | 83 |  |      } | 
  | 84 |  |   | 
  | 85 |  |      public void setOrganization(String value) { | 
  | 86 | 0 |          data.set(Properties.ORGANIZATION.getKey(), value); | 
  | 87 | 0 |      } | 
  | 88 |  |      public String getOrganization() { | 
  | 89 | 0 |          return (String) data.get(Properties.ORGANIZATION.getKey()); | 
  | 90 |  |      } | 
  | 91 |  |   | 
  | 92 |  |      public void setDescription(String value) { | 
  | 93 | 0 |          data.set(Properties.DESCRIPTION.getKey(), value); | 
  | 94 | 0 |      } | 
  | 95 |  |      public String getDescription() { | 
  | 96 | 0 |          return (String) data.get (Properties.DESCRIPTION.getKey ()); | 
  | 97 |  |      } | 
  | 98 |  |   | 
  | 99 |  |      public void setEffectiveDate(Date value) { | 
  | 100 | 0 |          data.set(Properties.EFFECTIVE_DATE.getKey(), value); | 
  | 101 | 0 |      } | 
  | 102 |  |      public Date getEffectiveDate() { | 
  | 103 | 0 |          return (Date) data.get(Properties.EFFECTIVE_DATE.getKey()); | 
  | 104 |  |      } | 
  | 105 |  |   | 
  | 106 |  |      public void setExpirationDate(Date value) { | 
  | 107 | 0 |          data.set(Properties.EXPIRATION_DATE.getKey(), value); | 
  | 108 | 0 |      } | 
  | 109 |  |      public Date getExpirationDate() { | 
  | 110 | 0 |          return (Date) data.get(Properties.EXPIRATION_DATE.getKey()); | 
  | 111 |  |      } | 
  | 112 |  |   | 
  | 113 |  |      public void setMetaInfo (MetaInfoHelper value) { | 
  | 114 | 0 |          data.set (Properties.META_INFO.getKey (), (value == null) ? null : value.getData ()); | 
  | 115 | 0 |      } | 
  | 116 |  |      public MetaInfoHelper getMetaInfo () { | 
  | 117 | 0 |          return MetaInfoHelper.wrap ((Data) data.get (Properties.META_INFO.getKey ())); | 
  | 118 |  |      } | 
  | 119 |  |   | 
  | 120 |  |      public void setName(String name) { | 
  | 121 | 0 |          data.set(Properties.NAME.getKey(), name); | 
  | 122 | 0 |      } | 
  | 123 |  |      public String getName() { | 
  | 124 | 0 |          return (String) data.get(Properties.NAME.getKey()); | 
  | 125 |  |      } | 
  | 126 |  |   | 
  | 127 |  |      public void setState(String state) { | 
  | 128 | 0 |          data.set(Properties.STATE.getKey(), state); | 
  | 129 | 0 |      } | 
  | 130 |  |      public String getState() { | 
  | 131 | 0 |          return (String) data.get(Properties.STATE.getKey()); | 
  | 132 |  |      } | 
  | 133 |  |   | 
  | 134 |  |      public void setType(String type) { | 
  | 135 | 0 |          data.set(Properties.TYPE.getKey(), type); | 
  | 136 | 0 |      } | 
  | 137 |  |      public String getType() { | 
  | 138 | 0 |          return (String) data.get(Properties.TYPE.getKey()); | 
  | 139 |  |      } | 
  | 140 |  |   | 
  | 141 |  |      public void setReusable(Boolean reusable) { | 
  | 142 | 0 |          Boolean newValue = reusable; | 
  | 143 | 0 |          if (reusable == null) { | 
  | 144 | 0 |              newValue = new Boolean(false); | 
  | 145 |  |          } | 
  | 146 | 0 |          data.set(Properties.REUSABLE.getKey(), newValue); | 
  | 147 | 0 |      } | 
  | 148 |  |      public Boolean getReusable() { | 
  | 149 | 0 |          Boolean reUsable = (Boolean) data.get(Properties.REUSABLE.getKey()); | 
  | 150 | 0 |          if (reUsable == null) { | 
  | 151 | 0 |              reUsable = new Boolean(false); | 
  | 152 |  |          } | 
  | 153 | 0 |          return reUsable; | 
  | 154 |  |      } | 
  | 155 |  |   | 
  | 156 |  |      public void setReferenceable(Boolean referenceable) { | 
  | 157 | 0 |          Boolean newValue = referenceable; | 
  | 158 | 0 |          if (referenceable == null) { | 
  | 159 | 0 |              newValue = new Boolean(false); | 
  | 160 |  |          } | 
  | 161 | 0 |          data.set(Properties.REFERENCEABLE.getKey(), newValue); | 
  | 162 | 0 |      } | 
  | 163 |  |      public Boolean getReferenceable() { | 
  | 164 | 0 |          Boolean referenceable = (Boolean) data.get(Properties.REFERENCEABLE.getKey()); | 
  | 165 | 0 |          if (referenceable == null) { | 
  | 166 | 0 |              referenceable = new Boolean(false); | 
  | 167 |  |          } | 
  | 168 | 0 |          return referenceable; | 
  | 169 |  |      } | 
  | 170 |  |   | 
  | 171 |  |      public void setApprovedClus(Data value) { | 
  | 172 | 0 |          data.set(Properties.APPROVED_CLUS.getKey(), value); | 
  | 173 | 0 |      } | 
  | 174 |  |      public Data getApprovedClus() { | 
  | 175 | 0 |          Data approvedClusData = data.get(Properties.APPROVED_CLUS.getKey()); | 
  | 176 | 0 |          if (approvedClusData == null) { | 
  | 177 | 0 |              approvedClusData = new Data(); | 
  | 178 | 0 |              setApprovedClus(approvedClusData); | 
  | 179 |  |          } | 
  | 180 | 0 |          return approvedClusData; | 
  | 181 |  |      } | 
  | 182 |  |      public void setProposedClus(Data value) { | 
  | 183 | 0 |          data.set(Properties.PROPOSED_CLUS.getKey(), value); | 
  | 184 | 0 |      } | 
  | 185 |  |      public Data getProposedClus() { | 
  | 186 | 0 |          Data proposedClusData = data.get(Properties.PROPOSED_CLUS.getKey()); | 
  | 187 | 0 |          if (proposedClusData == null) { | 
  | 188 | 0 |              proposedClusData = new Data(); | 
  | 189 | 0 |              setProposedClus(proposedClusData); | 
  | 190 |  |          } | 
  | 191 | 0 |          return proposedClusData; | 
  | 192 |  |      } | 
  | 193 |  |      public void setAllClus(Data value) { | 
  | 194 | 0 |          data.set(Properties.ALL_CLUS.getKey(), value); | 
  | 195 | 0 |      } | 
  | 196 |  |      public Data getAllClus() { | 
  | 197 | 0 |          Data allClusData = data.get(Properties.ALL_CLUS.getKey()); | 
  | 198 | 0 |          if (allClusData == null) { | 
  | 199 | 0 |              allClusData = new Data(); | 
  | 200 | 0 |              setAllClus(allClusData); | 
  | 201 |  |          } | 
  | 202 | 0 |          return allClusData; | 
  | 203 |  |      } | 
  | 204 |  |      public void setCluSets(Data value) { | 
  | 205 | 0 |          data.set(Properties.CLUSETS.getKey(), value); | 
  | 206 | 0 |      } | 
  | 207 |  |      public Data getCluSets() { | 
  | 208 | 0 |          Data cluSetData = data.get(Properties.CLUSETS.getKey()); | 
  | 209 | 0 |          if (cluSetData == null) { | 
  | 210 | 0 |              cluSetData = new Data(); | 
  | 211 | 0 |              setCluSets(cluSetData); | 
  | 212 |  |          } | 
  | 213 | 0 |          return cluSetData; | 
  | 214 |  |      } | 
  | 215 |  |      public void setCluRangeParams(Data value) { | 
  | 216 | 0 |          data.set(Properties.CLU_SET_RANGE.getKey(), value); | 
  | 217 | 0 |      } | 
  | 218 |  |      public CluSetRangeHelper getCluRangeParams() { | 
  | 219 | 0 |          Data cluRangeParamsData = data.get(Properties.CLU_SET_RANGE.getKey()); | 
  | 220 | 0 |          if (cluRangeParamsData == null) { | 
  | 221 | 0 |              cluRangeParamsData = new Data(); | 
  | 222 | 0 |              setCluRangeParams(cluRangeParamsData); | 
  | 223 |  |          } | 
  | 224 | 0 |          return new CluSetRangeHelper(cluRangeParamsData); | 
  | 225 |  |      } | 
  | 226 |  |      public void setCluRangeViewDetails(Data value) { | 
  | 227 | 0 |          data.set(Properties.CLU_SET_RANGE_VIEW_DETAILS.getKey(), value); | 
  | 228 | 0 |      } | 
  | 229 |  |      public Data getCluRangeViewDetails() { | 
  | 230 | 0 |          Data cluSetRangeViewDetailsData = data.get(Properties.CLU_SET_RANGE_VIEW_DETAILS.getKey()); | 
  | 231 | 0 |          if (cluSetRangeViewDetailsData == null) { | 
  | 232 | 0 |              cluSetRangeViewDetailsData = new Data(); | 
  | 233 | 0 |              setCluRangeViewDetails(cluSetRangeViewDetailsData); | 
  | 234 |  |          } | 
  | 235 | 0 |          return cluSetRangeViewDetailsData; | 
  | 236 |  |      } | 
  | 237 |  |   | 
  | 238 |  |  } |