Coverage Report - org.kuali.student.r2.lum.clu.dto.CluInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CluInfo
0%
0/148
0%
0/50
1.41
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 package org.kuali.student.r2.lum.clu.dto;
 16  
 
 17  
 import org.kuali.student.r2.common.dto.AmountInfo;
 18  
 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
 19  
 import org.kuali.student.r2.common.dto.TimeAmountInfo;
 20  
 import org.kuali.student.r2.core.versionmanagement.dto.VersionInfo;
 21  
 import org.kuali.student.r2.lum.clu.infc.Accreditation;
 22  
 import org.kuali.student.r2.lum.clu.infc.AdminOrg;
 23  
 import org.kuali.student.r2.lum.clu.infc.Clu;
 24  
 import org.kuali.student.r2.lum.clu.infc.CluIdentifier;
 25  
 import org.kuali.student.r2.lum.clu.infc.CluInstructor;
 26  
 import org.kuali.student.r2.lum.clu.infc.LuCode;
 27  
 
 28  
 import javax.xml.bind.Element;
 29  
 import javax.xml.bind.annotation.XmlAccessType;
 30  
 import javax.xml.bind.annotation.XmlAccessorType;
 31  
 import javax.xml.bind.annotation.XmlAnyElement;
 32  
 import javax.xml.bind.annotation.XmlElement;
 33  
 import javax.xml.bind.annotation.XmlType;
 34  
 import java.io.Serializable;
 35  
 import java.util.ArrayList;
 36  
 import java.util.Date;
 37  
 import java.util.List;
 38  
 import org.kuali.student.r2.common.dto.RichTextInfo;
 39  
 
 40  0
 @XmlAccessorType(XmlAccessType.FIELD)
 41  
 @XmlType(name = "CluInfo", propOrder = {"id",
 42  
     "typeKey",
 43  
     "stateKey",
 44  
     "descr",
 45  
     "officialIdentifier",
 46  
     "alternateIdentifiers",
 47  
     "studySubjectArea",
 48  
     "campusLocations",
 49  
     "accreditations",
 50  
     "adminOrgs",
 51  
     "primaryInstructor",
 52  
     "instructors",
 53  
     "expectedFirstAtp",
 54  
     "lastAtp",
 55  
     "lastAdmitAtp",
 56  
     "intensity",
 57  
     "stdDuration",
 58  
     "canCreateLui",
 59  
     "referenceURL",
 60  
     "luCodes",
 61  
     "nextReviewPeriod",
 62  
     "isEnrollable",
 63  
     "offeredAtpTypes",
 64  
     "hasEarlyDropDeadline",
 65  
     "defaultEnrollmentEstimate",
 66  
     "defaultMaximumEnrollment",
 67  
     "isHazardousForDisabledStudents",
 68  
     "feeInfo",
 69  
     "accountingInfo",
 70  
     "versionInfo",
 71  
     "effectiveDate",
 72  
     "expirationDate",
 73  
     "meta",
 74  
     "attributes",
 75  
     "_futureElements"})
 76  
 public class CluInfo extends IdNamelessEntityInfo implements Serializable, Clu {
 77  
 
 78  
     private static final long serialVersionUID = 1L;
 79  
     @XmlElement 
 80  
     private RichTextInfo descr;
 81  
     @XmlElement
 82  
     private CluIdentifierInfo officialIdentifier;
 83  
     @XmlElement
 84  
     private List<CluIdentifierInfo> alternateIdentifiers;
 85  
     @XmlElement
 86  
     private String studySubjectArea;
 87  
     @XmlElement
 88  
     private List<String> campusLocations;
 89  
     @XmlElement
 90  
     private List<AccreditationInfo> accreditations;
 91  
     @XmlElement
 92  
     private List<AdminOrgInfo> adminOrgs;
 93  
     @XmlElement
 94  
     private CluInstructorInfo primaryInstructor;
 95  
     @XmlElement
 96  
     private List<CluInstructorInfo> instructors;
 97  
     @XmlElement
 98  
     private String expectedFirstAtp;
 99  
     @XmlElement
 100  
     private String lastAtp;
 101  
     @XmlElement
 102  
     private String lastAdmitAtp;
 103  
     @XmlElement
 104  
     private AmountInfo intensity;
 105  
     @XmlElement
 106  
     private TimeAmountInfo stdDuration;
 107  
     @XmlElement
 108  
     private Boolean canCreateLui;
 109  
     @XmlElement
 110  
     private String referenceURL;
 111  
     @XmlElement
 112  
     private List<LuCodeInfo> luCodes;
 113  
     @XmlElement
 114  
     private String nextReviewPeriod;
 115  
     @XmlElement
 116  
     private Boolean isEnrollable;
 117  
     @XmlElement
 118  
     private List<String> offeredAtpTypes;
 119  
     @XmlElement
 120  
     private Boolean hasEarlyDropDeadline;
 121  
     @XmlElement
 122  
     private int defaultEnrollmentEstimate;
 123  
     @XmlElement
 124  
     private int defaultMaximumEnrollment;
 125  
     @XmlElement
 126  
     private Boolean isHazardousForDisabledStudents;
 127  
     @XmlElement
 128  
     private CluFeeInfo feeInfo;
 129  
     @XmlElement
 130  
     private CluAccountingInfo accountingInfo;
 131  
     @XmlElement
 132  
     private VersionInfo versionInfo;
 133  
     @XmlElement
 134  
     private Date effectiveDate;
 135  
     @XmlElement
 136  
     private Date expirationDate;
 137  
     @XmlAnyElement
 138  
     private List<Element> _futureElements;
 139  
 
 140  0
     public CluInfo() {
 141  0
     }
 142  
 
 143  
     public CluInfo(Clu clu) {
 144  0
         super(clu);
 145  0
         if (null != clu) {
 146  0
             if (clu.getDescr() != null) {
 147  0
                 this.descr = new RichTextInfo (clu.getDescr());
 148  
             }
 149  0
             this.officialIdentifier = (null != clu.getOfficialIdentifier()) ? new CluIdentifierInfo(clu.getOfficialIdentifier()) : null;
 150  0
             this.alternateIdentifiers = new ArrayList<CluIdentifierInfo>();
 151  0
             for (CluIdentifier cluIdentifier : clu.getAlternateIdentifiers()) {
 152  0
                 this.alternateIdentifiers.add(new CluIdentifierInfo(cluIdentifier));
 153  
             }
 154  0
             this.studySubjectArea = clu.getStudySubjectArea();
 155  0
             this.campusLocations = (null != clu.getCampusLocations()) ? new ArrayList<String>(clu.getCampusLocations()) : null;
 156  0
             this.accreditations = new ArrayList<AccreditationInfo>();
 157  0
             for (Accreditation accreditation : clu.getAccreditations()) {
 158  0
                 this.accreditations.add(new AccreditationInfo(accreditation));
 159  
             }
 160  0
             this.adminOrgs = new ArrayList<AdminOrgInfo>();
 161  0
             for (AdminOrg adminOrg : clu.getAdminOrgs()) {
 162  0
                 this.adminOrgs.add(new AdminOrgInfo(adminOrg));
 163  
             }
 164  0
             this.primaryInstructor = (null != clu.getPrimaryInstructor()) ? new CluInstructorInfo(clu.getPrimaryInstructor()) : null;
 165  0
             this.instructors = new ArrayList<CluInstructorInfo>();
 166  0
             for (CluInstructor cluInstructor : clu.getInstructors()) {
 167  0
                 this.instructors.add(new CluInstructorInfo(cluInstructor));
 168  
             }
 169  0
             this.expectedFirstAtp = clu.getExpectedFirstAtp();
 170  0
             this.lastAtp = clu.getLastAtp();
 171  0
             this.lastAdmitAtp = clu.getLastAdmitAtp();
 172  0
             this.intensity = (null != clu.getIntensity()) ? new AmountInfo(clu.getIntensity()) : null;
 173  0
             this.stdDuration = (null != clu.getStdDuration()) ? new TimeAmountInfo(clu.getStdDuration()) : null;
 174  0
             this.canCreateLui = clu.getCanCreateLui();
 175  0
             this.referenceURL = clu.getReferenceURL();
 176  0
             this.luCodes = new ArrayList<LuCodeInfo>();
 177  0
             for (LuCode luCode : clu.getLuCodes()) {
 178  0
                 this.luCodes.add(new LuCodeInfo(luCode));
 179  
             }
 180  0
             this.nextReviewPeriod = clu.getNextReviewPeriod();
 181  0
             this.isEnrollable = clu.getIsEnrollable();
 182  0
             this.offeredAtpTypes = (null != clu.getOfferedAtpTypes()) ? new ArrayList<String>(clu.getOfferedAtpTypes()) : null;
 183  0
             this.hasEarlyDropDeadline = clu.getHasEarlyDropDeadline();
 184  0
             this.defaultEnrollmentEstimate = clu.getDefaultEnrollmentEstimate();
 185  0
             this.defaultMaximumEnrollment = clu.getDefaultMaximumEnrollment();
 186  0
             this.isHazardousForDisabledStudents = clu.GetIsHazardousForDisabledStudents();
 187  0
             this.feeInfo = (null != clu.getFeeInfo()) ? new CluFeeInfo(clu.getFeeInfo()) : null;
 188  0
             this.accountingInfo = (null != clu.getAccountingInfo()) ? new CluAccountingInfo(clu.getAccountingInfo()) : null;
 189  0
             this.versionInfo = (null != clu.getVersionInfo()) ? new VersionInfo(clu.getVersionInfo()) : null;
 190  0
             this.effectiveDate = (null != clu.getEffectiveDate()) ? new Date(clu.getEffectiveDate().getTime()) : null;
 191  0
             this.expirationDate = (null != clu.getExpirationDate()) ? new Date(clu.getExpirationDate().getTime()) : null;
 192  
         }
 193  0
     }
 194  
 
 195  
     @Override
 196  
     public RichTextInfo getDescr() {
 197  0
         return descr;
 198  
     }
 199  
 
 200  
     public void setDescr(RichTextInfo descr) {
 201  0
         this.descr = descr;
 202  0
     }
 203  
 
 204  
     @Override
 205  
     public CluIdentifierInfo getOfficialIdentifier() {
 206  0
         return officialIdentifier;
 207  
     }
 208  
 
 209  
     public void setOfficialIdentifier(CluIdentifierInfo officialIdentifier) {
 210  0
         this.officialIdentifier = officialIdentifier;
 211  0
     }
 212  
 
 213  
     @Override
 214  
     public List<CluIdentifierInfo> getAlternateIdentifiers() {
 215  0
         if (alternateIdentifiers == null) {
 216  0
             alternateIdentifiers = new ArrayList<CluIdentifierInfo>();
 217  
         }
 218  0
         return alternateIdentifiers;
 219  
     }
 220  
 
 221  
     public void setAlternateIdentifiers(List<CluIdentifierInfo> alternateIdentifiers) {
 222  0
         this.alternateIdentifiers = alternateIdentifiers;
 223  0
     }
 224  
 
 225  
     @Override
 226  
     public String getStudySubjectArea() {
 227  0
         return studySubjectArea;
 228  
     }
 229  
 
 230  
     public void setStudySubjectArea(String studySubjectArea) {
 231  0
         this.studySubjectArea = studySubjectArea;
 232  0
     }
 233  
 
 234  
     @Override
 235  
     public List<AccreditationInfo> getAccreditations() {
 236  0
         if (accreditations == null) {
 237  0
             accreditations = new ArrayList<AccreditationInfo>();
 238  
         }
 239  0
         return accreditations;
 240  
     }
 241  
 
 242  
     public void setAccreditations(List<AccreditationInfo> accreditations) {
 243  0
         this.accreditations = accreditations;
 244  0
     }
 245  
 
 246  
     @Override
 247  
     public List<String> getCampusLocations() {
 248  0
         if (campusLocations == null) {
 249  0
             campusLocations = new ArrayList<String>();
 250  
         }
 251  0
         return campusLocations;
 252  
     }
 253  
 
 254  
     public void setCampusLocations(List<String> campusLocations) {
 255  0
         this.campusLocations = campusLocations;
 256  0
     }
 257  
 
 258  
     @Override
 259  
     public List<AdminOrgInfo> getAdminOrgs() {
 260  0
         if (adminOrgs == null) {
 261  0
             adminOrgs = new ArrayList<AdminOrgInfo>();
 262  
         }
 263  0
         return adminOrgs;
 264  
     }
 265  
 
 266  
     public void setAdminOrgs(List<AdminOrgInfo> adminOrgs) {
 267  0
         this.adminOrgs = adminOrgs;
 268  0
     }
 269  
 
 270  
     @Override
 271  
     public CluInstructorInfo getPrimaryInstructor() {
 272  0
         return primaryInstructor;
 273  
     }
 274  
 
 275  
     public void setPrimaryInstructor(CluInstructorInfo primaryInstructor) {
 276  0
         this.primaryInstructor = primaryInstructor;
 277  0
     }
 278  
 
 279  
     @Override
 280  
     public List<CluInstructorInfo> getInstructors() {
 281  0
         if (instructors == null) {
 282  0
             instructors = new ArrayList<CluInstructorInfo>();
 283  
         }
 284  0
         return instructors;
 285  
     }
 286  
 
 287  
     public void setInstructors(List<CluInstructorInfo> instructors) {
 288  0
         this.instructors = instructors;
 289  0
     }
 290  
 
 291  
     @Override
 292  
     public AmountInfo getIntensity() {
 293  0
         return intensity;
 294  
     }
 295  
 
 296  
     public void setIntensity(AmountInfo intensity) {
 297  0
         this.intensity = intensity;
 298  0
     }
 299  
 
 300  
     @Override
 301  
     public TimeAmountInfo getStdDuration() {
 302  0
         return stdDuration;
 303  
     }
 304  
 
 305  
     public void setStdDuration(TimeAmountInfo stdDuration) {
 306  0
         this.stdDuration = stdDuration;
 307  0
     }
 308  
 
 309  
     @Override
 310  
     public Boolean getCanCreateLui() {
 311  0
         return canCreateLui;
 312  
     }
 313  
 
 314  
     public void setCanCreateLui(Boolean canCreateLui) {
 315  0
         this.canCreateLui = canCreateLui;
 316  0
     }
 317  
 
 318  
     @Override
 319  
     public String getReferenceURL() {
 320  0
         return referenceURL;
 321  
     }
 322  
 
 323  
     public void setReferenceURL(String referenceURL) {
 324  0
         this.referenceURL = referenceURL;
 325  0
     }
 326  
 
 327  
     @Override
 328  
     public List<LuCodeInfo> getLuCodes() {
 329  0
         if (luCodes == null) {
 330  0
             luCodes = new ArrayList<LuCodeInfo>();
 331  
         }
 332  0
         return luCodes;
 333  
     }
 334  
 
 335  
     public void setLuCodes(List<LuCodeInfo> luCodes) {
 336  0
         this.luCodes = luCodes;
 337  0
     }
 338  
 
 339  
     @Override
 340  
     public String getNextReviewPeriod() {
 341  0
         return nextReviewPeriod;
 342  
     }
 343  
 
 344  
     public void setNextReviewPeriod(String nextReviewPeriod) {
 345  0
         this.nextReviewPeriod = nextReviewPeriod;
 346  0
     }
 347  
 
 348  
     @Override
 349  
     public Boolean getIsEnrollable() {
 350  0
         return isEnrollable;
 351  
     }
 352  
 
 353  
     public void setIsEnrollable(Boolean isEnrollable) {
 354  0
         this.isEnrollable = isEnrollable;
 355  0
     }
 356  
 
 357  
     @Override
 358  
     public List<String> getOfferedAtpTypes() {
 359  0
         if (offeredAtpTypes == null) {
 360  0
             offeredAtpTypes = new ArrayList<String>();
 361  
         }
 362  0
         return offeredAtpTypes;
 363  
     }
 364  
 
 365  
     public void setOfferedAtpTypes(List<String> offeredAtpTypes) {
 366  0
         this.offeredAtpTypes = offeredAtpTypes;
 367  0
     }
 368  
 
 369  
     @Override
 370  
     public Boolean getHasEarlyDropDeadline() {
 371  0
         return hasEarlyDropDeadline;
 372  
     }
 373  
 
 374  
     public void setIsHasEarlyDropDeadline(Boolean hasEarlyDropDeadline) {
 375  0
         this.hasEarlyDropDeadline = hasEarlyDropDeadline;
 376  0
     }
 377  
 
 378  
     @Override
 379  
     public int getDefaultEnrollmentEstimate() {
 380  0
         return defaultEnrollmentEstimate;
 381  
     }
 382  
 
 383  
     public void setDefaultEnrollmentEstimate(int defaultEnrollmentEstimate) {
 384  0
         this.defaultEnrollmentEstimate = defaultEnrollmentEstimate;
 385  0
     }
 386  
 
 387  
     @Override
 388  
     public int getDefaultMaximumEnrollment() {
 389  0
         return defaultMaximumEnrollment;
 390  
     }
 391  
 
 392  
     public void setDefaultMaximumEnrollment(int defaultMaximumEnrollment) {
 393  0
         this.defaultMaximumEnrollment = defaultMaximumEnrollment;
 394  0
     }
 395  
 
 396  
     @Override
 397  
     public Boolean GetIsHazardousForDisabledStudents() {
 398  0
         return isHazardousForDisabledStudents;
 399  
     }
 400  
 
 401  
     public void setIsHazardousForDisabledStudents(Boolean isHazardousForDisabledStudents) {
 402  0
         this.isHazardousForDisabledStudents = isHazardousForDisabledStudents;
 403  0
     }
 404  
 
 405  
     @Override
 406  
     public CluFeeInfo getFeeInfo() {
 407  0
         return feeInfo;
 408  
     }
 409  
 
 410  
     public void setFeeInfo(CluFeeInfo feeInfo) {
 411  0
         this.feeInfo = feeInfo;
 412  0
     }
 413  
 
 414  
     @Override
 415  
     public CluAccountingInfo getAccountingInfo() {
 416  0
         return accountingInfo;
 417  
     }
 418  
 
 419  
     public void setAccountingInfo(CluAccountingInfo accountingInfo) {
 420  0
         this.accountingInfo = accountingInfo;
 421  0
     }
 422  
 
 423  
     @Override
 424  
     public VersionInfo getVersionInfo() {
 425  0
         return versionInfo;
 426  
     }
 427  
 
 428  
     public void setVersionInfo(VersionInfo versionInfo) {
 429  0
         this.versionInfo = versionInfo;
 430  0
     }
 431  
 
 432  
     @Override
 433  
     public String getExpectedFirstAtp() {
 434  0
         return expectedFirstAtp;
 435  
     }
 436  
 
 437  
     public void setExpectedFirstAtpId(String expectedFirstAtp) {
 438  0
         this.expectedFirstAtp = expectedFirstAtp;
 439  0
     }
 440  
 
 441  
     @Override
 442  
     public String getLastAtp() {
 443  0
         return lastAtp;
 444  
     }
 445  
 
 446  
     public void setLastAtp(String lastAtp) {
 447  0
         this.lastAtp = lastAtp;
 448  0
     }
 449  
 
 450  
     @Override
 451  
     public String getLastAdmitAtp() {
 452  0
         return lastAdmitAtp;
 453  
     }
 454  
 
 455  
     public void setLastAdmitAtp(String lastAdmitAtp) {
 456  0
         this.lastAdmitAtp = lastAdmitAtp;
 457  0
     }
 458  
 
 459  
     @Override
 460  
     public Date getEffectiveDate() {
 461  0
         return effectiveDate;
 462  
     }
 463  
 
 464  
     public void setEffectiveDate(Date effectiveDate) {
 465  0
         this.effectiveDate = effectiveDate;
 466  0
     }
 467  
 
 468  
     @Override
 469  
     public Date getExpirationDate() {
 470  0
         return expirationDate;
 471  
     }
 472  
 
 473  
     public void setExpirationDate(Date expirationDate) {
 474  0
         this.expirationDate = expirationDate;
 475  0
     }
 476  
 
 477  
     @Override
 478  
     public String toString() {
 479  0
         return "CluInfo[id=" + this.getId() + ", type=" + this.getTypeKey() + "]";
 480  
     }
 481  
 }