|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.student.enrollment.classII.acal.dto;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import java.io.Serializable;  | 
  |  19 |     | 
   import java.util.Date;  | 
  |  20 |     | 
   import java.util.List;  | 
  |  21 |     | 
     | 
  |  22 |     | 
   import javax.xml.bind.annotation.XmlAccessType;  | 
  |  23 |     | 
   import javax.xml.bind.annotation.XmlAccessorType;  | 
  |  24 |     | 
   import javax.xml.bind.annotation.XmlAnyElement;  | 
  |  25 |     | 
   import javax.xml.bind.annotation.XmlElement;  | 
  |  26 |     | 
   import javax.xml.bind.annotation.XmlType;  | 
  |  27 |     | 
     | 
  |  28 |     | 
   import org.kuali.student.enrollment.classII.acal.infc.AcademicCalendar;  | 
  |  29 |     | 
   import org.kuali.student.r2.common.dto.KeyEntityInfo;  | 
  |  30 |     | 
   import org.kuali.student.r2.common.infc.ModelBuilder;  | 
  |  31 |     | 
   import org.w3c.dom.Element;  | 
  |  32 |     | 
     | 
  |  33 |     | 
   @XmlAccessorType(XmlAccessType.FIELD)  | 
  |  34 |     | 
   @XmlType(name = "AcademicCalendarInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "startDate", "endDate", "campusCalendarKeys", "credentialProgramTypeKey", "metaInfo", "attributes", "_futureElements"}) | 
  |  35 |     | 
     | 
  |  36 |     | 
   public class AcademicCalendarInfo extends KeyEntityInfo implements AcademicCalendar, Serializable { | 
  |  37 |     | 
     | 
  |  38 |     | 
       private static final long serialVersionUID = 1L;  | 
  |  39 |     | 
     | 
  |  40 |     | 
       @XmlElement  | 
  |  41 |     | 
       private final Date startDate;  | 
  |  42 |     | 
     | 
  |  43 |     | 
       @XmlElement  | 
  |  44 |     | 
       private final Date endDate;  | 
  |  45 |     | 
     | 
  |  46 |     | 
       @XmlElement  | 
  |  47 |     | 
       private final List<String> campusCalendarKeys;  | 
  |  48 |     | 
     | 
  |  49 |     | 
       @XmlElement   | 
  |  50 |     | 
       private final String credentialProgramTypeKey;  | 
  |  51 |     | 
     | 
  |  52 |     | 
       @XmlAnyElement  | 
  |  53 |     | 
       private final List<Element> _futureElements;    | 
  |  54 |     | 
     | 
  |  55 |    0 |        private AcademicCalendarInfo() { | 
  |  56 |    0 |            startDate = null;  | 
  |  57 |    0 |            endDate = null;  | 
  |  58 |    0 |            campusCalendarKeys = null;  | 
  |  59 |    0 |            credentialProgramTypeKey = null;  | 
  |  60 |    0 |            _futureElements = null;  | 
  |  61 |    0 |        }  | 
  |  62 |     | 
     | 
  |  63 |     | 
         | 
  |  64 |     | 
     | 
  |  65 |     | 
     | 
  |  66 |     | 
     | 
  |  67 |     | 
     | 
  |  68 |     | 
     | 
  |  69 |     | 
       public AcademicCalendarInfo(AcademicCalendar academicCalendar) { | 
  |  70 |    0 |            super(academicCalendar);  | 
  |  71 |     | 
     | 
  |  72 |    0 |            this.startDate = null != academicCalendar.getStartDate() ? new Date(academicCalendar.getStartDate().getTime()) : null;  | 
  |  73 |    0 |            this.endDate = null != academicCalendar.getEndDate() ? new Date(academicCalendar.getEndDate().getTime()) : null;  | 
  |  74 |    0 |            this.campusCalendarKeys = academicCalendar.getCampusCalendarKeys();  | 
  |  75 |    0 |            this.credentialProgramTypeKey = academicCalendar.getCredentialProgramTypeKey();  | 
  |  76 |     | 
     | 
  |  77 |    0 |            _futureElements = null;  | 
  |  78 |    0 |        }  | 
  |  79 |     | 
     | 
  |  80 |     | 
     | 
  |  81 |     | 
       @Override  | 
  |  82 |     | 
       public Date getStartDate() { | 
  |  83 |    0 |            return startDate;  | 
  |  84 |     | 
       }  | 
  |  85 |     | 
     | 
  |  86 |     | 
     | 
  |  87 |     | 
       @Override  | 
  |  88 |     | 
       public Date getEndDate() { | 
  |  89 |    0 |            return endDate;  | 
  |  90 |     | 
       }  | 
  |  91 |     | 
     | 
  |  92 |     | 
     | 
  |  93 |     | 
       @Override  | 
  |  94 |     | 
       public List<String> getCampusCalendarKeys() { | 
  |  95 |    0 |            return campusCalendarKeys;  | 
  |  96 |     | 
       }  | 
  |  97 |     | 
     | 
  |  98 |     | 
       @Override  | 
  |  99 |     | 
       public String getCredentialProgramTypeKey() { | 
  |  100 |    0 |            return credentialProgramTypeKey;  | 
  |  101 |     | 
       }  | 
  |  102 |     | 
     | 
  |  103 |     | 
         | 
  |  104 |     | 
     | 
  |  105 |     | 
     | 
  |  106 |    0 |        public static class Builder extends KeyEntityInfo.Builder implements ModelBuilder<AcademicCalendarInfo>, AcademicCalendar { | 
  |  107 |     | 
     | 
  |  108 |     | 
           private Date startDate;  | 
  |  109 |     | 
           private Date endDate;  | 
  |  110 |     | 
           private List<String> campusCalendarKeys;  | 
  |  111 |     | 
           private String credentialProgramTypeKey;  | 
  |  112 |     | 
     | 
  |  113 |     | 
     | 
  |  114 |     | 
             | 
  |  115 |     | 
     | 
  |  116 |     | 
     | 
  |  117 |    0 |            public Builder() {} | 
  |  118 |     | 
     | 
  |  119 |     | 
             | 
  |  120 |     | 
     | 
  |  121 |     | 
     | 
  |  122 |     | 
           public Builder(AcademicCalendar academicCalendar) { | 
  |  123 |    0 |                super(academicCalendar);  | 
  |  124 |     | 
     | 
  |  125 |    0 |                this.startDate = academicCalendar.getStartDate();  | 
  |  126 |    0 |                this.endDate = academicCalendar.getEndDate();  | 
  |  127 |    0 |                this.campusCalendarKeys =  academicCalendar.getCampusCalendarKeys();  | 
  |  128 |    0 |                this.credentialProgramTypeKey = academicCalendar.getCredentialProgramTypeKey();  | 
  |  129 |    0 |            }  | 
  |  130 |     | 
     | 
  |  131 |     | 
      | 
  |  132 |     | 
           public AcademicCalendarInfo build() { | 
  |  133 |    0 |                return new AcademicCalendarInfo(this);  | 
  |  134 |     | 
           }  | 
  |  135 |     | 
     | 
  |  136 |     | 
     | 
  |  137 |     | 
           @Override  | 
  |  138 |     | 
           public Date getStartDate() { | 
  |  139 |    0 |                return startDate;  | 
  |  140 |     | 
           }  | 
  |  141 |     | 
     | 
  |  142 |     | 
     | 
  |  143 |     | 
           public void setStartDate(Date startDate) { | 
  |  144 |    0 |                this.startDate = startDate;  | 
  |  145 |    0 |            }  | 
  |  146 |     | 
     | 
  |  147 |     | 
       | 
  |  148 |     | 
           @Override  | 
  |  149 |     | 
           public Date getEndDate() { | 
  |  150 |    0 |                return endDate;  | 
  |  151 |     | 
           }  | 
  |  152 |     | 
     | 
  |  153 |     | 
     | 
  |  154 |     | 
           public void setEndDate(Date endDate) { | 
  |  155 |    0 |                this.endDate = endDate;  | 
  |  156 |    0 |            }  | 
  |  157 |     | 
     | 
  |  158 |     | 
     | 
  |  159 |     | 
           @Override  | 
  |  160 |     | 
           public List<String> getCampusCalendarKeys() { | 
  |  161 |    0 |                return campusCalendarKeys;  | 
  |  162 |     | 
           }  | 
  |  163 |     | 
     | 
  |  164 |     | 
           public void setCampusCalendarKeys(List<String> campusCalendarKeys) { | 
  |  165 |    0 |                this.campusCalendarKeys = campusCalendarKeys;  | 
  |  166 |    0 |            }  | 
  |  167 |     | 
     | 
  |  168 |     | 
           public void addCampusCalendarKey(String campusCalendarKey) { | 
  |  169 |    0 |                this.campusCalendarKeys.add(campusCalendarKey);  | 
  |  170 |    0 |            }  | 
  |  171 |     | 
     | 
  |  172 |     | 
           @Override  | 
  |  173 |     | 
           public String getCredentialProgramTypeKey() { | 
  |  174 |    0 |                return credentialProgramTypeKey;  | 
  |  175 |     | 
           }  | 
  |  176 |     | 
     | 
  |  177 |     | 
           public void setCredentialProgramTypeKey(String credentialProgramTypeKey) { | 
  |  178 |    0 |                this.credentialProgramTypeKey = credentialProgramTypeKey;  | 
  |  179 |    0 |            }  | 
  |  180 |     | 
       }  | 
  |  181 |     | 
   }  |