Coverage Report - org.kuali.student.enrollment.courseoffering.dto.RegistrationGroupInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
RegistrationGroupInfo
0%
0/72
0%
0/8
1.179
 
 1  
 /*
 2  
  * Copyright 2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License.  You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 13  
  * implied.  See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.enrollment.courseoffering.dto;
 18  
 
 19  
 import java.util.ArrayList;
 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.courseoffering.infc.RegistrationGroup;
 29  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 30  
 import org.kuali.student.r2.common.dto.TimeAmountInfo;
 31  
 import org.w3c.dom.Element;
 32  
 
 33  
 /**
 34  
  * @author Kuali Student Team (Kamal)
 35  
  */
 36  0
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "RegistrationGroupInfo", propOrder = {"activityOfferingIds", 
 38  
     "courseOfferingId", "registrationCode", "termId", "formatOfferingId",
 39  
     "isHonorsOffering", "maximumEnrollment", 
 40  
     "minimumEnrollment", "hasWaitlist", "waitlistTypeKey", "waitlistMaximum", 
 41  
     "isWaitlistCheckinRequired", "waitlistCheckinFrequency", "id", 
 42  
     "typeKey", "stateKey", "name", "descr", "meta", "attributes", "_futureElements"})
 43  
 public class RegistrationGroupInfo extends IdEntityInfo implements RegistrationGroup {
 44  
 
 45  
     private static final long serialVersionUID = 1L;
 46  
 
 47  
     @XmlElement
 48  
     private List<String> activityOfferingIds;
 49  
 
 50  
     @XmlElement
 51  
     private String courseOfferingId;
 52  
 
 53  
     @XmlElement
 54  
     private Integer maximumEnrollment;
 55  
 
 56  
     @XmlElement
 57  
     private Integer minimumEnrollment;
 58  
 
 59  
     @XmlElement
 60  
     private String formatOfferingId;
 61  
 
 62  
     @XmlElement
 63  
     private String registrationCode;
 64  
 
 65  
     @XmlElement
 66  
     private String termId;
 67  
     
 68  
     @XmlElement
 69  
     private Boolean isHonorsOffering;
 70  
 
 71  
     @XmlElement
 72  
     private Boolean hasWaitlist;
 73  
 
 74  
     @XmlElement
 75  
     private String waitlistTypeKey;
 76  
 
 77  
     @XmlElement
 78  
     private Integer waitlistMaximum;
 79  
 
 80  
     @XmlElement
 81  
     private Boolean isWaitlistCheckinRequired;
 82  
 
 83  
     @XmlElement
 84  
     private TimeAmountInfo waitlistCheckinFrequency;
 85  
 
 86  
     @XmlAnyElement
 87  
     private List<Element> _futureElements;
 88  
 
 89  0
     public RegistrationGroupInfo() {
 90  0
         this.activityOfferingIds = new ArrayList<String>();
 91  0
         this.courseOfferingId = null;
 92  0
         this.formatOfferingId = null;
 93  0
         this.hasWaitlist = new Boolean(false);
 94  0
         this.isHonorsOffering = new Boolean(false);
 95  0
         this.isWaitlistCheckinRequired = new Boolean(false);
 96  0
         this.maximumEnrollment = null;
 97  0
         this.minimumEnrollment = null;
 98  0
         this.registrationCode = null;
 99  0
         this.termId = null;
 100  0
         this.waitlistCheckinFrequency = null;
 101  0
         this.waitlistMaximum = null;
 102  0
         this.waitlistTypeKey = null;
 103  0
         this._futureElements = null;
 104  0
     }
 105  
 
 106  
     public RegistrationGroupInfo(RegistrationGroup registrationGroup) {
 107  0
         super(registrationGroup); 
 108  
         
 109  0
         if(null == registrationGroup) return;      
 110  
         
 111  0
         this.activityOfferingIds = (null != registrationGroup.getActivityOfferingIds()) ? new ArrayList<String>(registrationGroup.getActivityOfferingIds()) : null;
 112  0
         this.courseOfferingId = registrationGroup.getCourseOfferingId();
 113  0
         this.formatOfferingId = registrationGroup.getFormatOfferingId();
 114  0
         this.hasWaitlist = registrationGroup.getHasWaitlist();
 115  0
         this.isHonorsOffering = (null != registrationGroup.getIsHonorsOffering()) ? new Boolean(registrationGroup.getIsHonorsOffering()) : null;
 116  0
         this.isWaitlistCheckinRequired = (null != registrationGroup.getIsWaitlistCheckinRequired()) ? new Boolean(registrationGroup.getIsWaitlistCheckinRequired()) : null;
 117  0
         this.maximumEnrollment = registrationGroup.getMaximumEnrollment();
 118  0
         this.minimumEnrollment = registrationGroup.getMinimumEnrollment();
 119  0
         this.registrationCode = registrationGroup.getRegistrationCode();
 120  0
                 this.termId = registrationGroup.getTermId();
 121  0
         this.waitlistCheckinFrequency = new TimeAmountInfo(registrationGroup.getWaitlistCheckinFrequency());
 122  0
         this.waitlistMaximum = registrationGroup.getWaitlistMaximum();
 123  0
         this.waitlistTypeKey = registrationGroup.getWaitlistTypeKey();
 124  0
     }
 125  
 
 126  
     @Override
 127  
     public List<String> getActivityOfferingIds() {
 128  0
         return activityOfferingIds;
 129  
     }
 130  
 
 131  
     @Override
 132  
     public String getCourseOfferingId() {
 133  0
         return courseOfferingId;
 134  
     }
 135  
 
 136  
     @Override
 137  
     public Integer getMaximumEnrollment() {
 138  0
         return maximumEnrollment;
 139  
     }
 140  
 
 141  
     @Override
 142  
     public Integer getMinimumEnrollment() {
 143  0
         return minimumEnrollment;
 144  
     }
 145  
 
 146  
     @Override
 147  
     public String getFormatOfferingId() {
 148  0
         return formatOfferingId;
 149  
     }
 150  
 
 151  
     @Override
 152  
     public String getRegistrationCode() {
 153  0
         return registrationCode;
 154  
     }
 155  
 
 156  
    @Override
 157  
     public String getTermId() {
 158  0
         return termId;
 159  
     }
 160  
     
 161  
     @Override
 162  
     public Boolean getIsHonorsOffering() {
 163  0
         return isHonorsOffering;
 164  
     }
 165  
 
 166  
     @Override
 167  
     public Boolean getHasWaitlist() {
 168  0
         return hasWaitlist;
 169  
     }
 170  
 
 171  
     @Override
 172  
     public String getWaitlistTypeKey() {
 173  0
         return waitlistTypeKey;
 174  
     }
 175  
 
 176  
     @Override
 177  
     public Integer getWaitlistMaximum() {
 178  0
         return waitlistMaximum;
 179  
     }
 180  
 
 181  
     @Override
 182  
     public Boolean getIsWaitlistCheckinRequired() {
 183  0
         return isWaitlistCheckinRequired;
 184  
     }
 185  
 
 186  
     @Override
 187  
     public TimeAmountInfo getWaitlistCheckinFrequency() {
 188  0
         return waitlistCheckinFrequency;
 189  
     }
 190  
 
 191  
     public void setActivityOfferingIds(List<String> activityOfferingIds) {
 192  0
         this.activityOfferingIds = activityOfferingIds;
 193  0
     }
 194  
 
 195  
     public void setCourseOfferingId(String courseOfferingId) {
 196  0
         this.courseOfferingId = courseOfferingId;
 197  0
     }
 198  
 
 199  
     public void setMaximumEnrollment(Integer maximumEnrollment) {
 200  0
         this.maximumEnrollment = maximumEnrollment;
 201  0
     }
 202  
 
 203  
     public void setMinimumEnrollment(Integer minimumEnrollment) {
 204  0
         this.minimumEnrollment = minimumEnrollment;
 205  0
     }
 206  
 
 207  
     public void setFormatOfferingId(String formatOfferingId) {
 208  0
         this.formatOfferingId = formatOfferingId;
 209  0
     }
 210  
 
 211  
     public void setRegistrationCode(String registrationCode) {
 212  0
         this.registrationCode = registrationCode;
 213  0
     }
 214  
 
 215  
     public void setTermId(String termId) {
 216  0
         this.termId = termId;
 217  0
     }
 218  
 
 219  
     public void setIsHonorsOffering(Boolean isHonorsOffering) {
 220  0
         this.isHonorsOffering = isHonorsOffering;
 221  0
     }
 222  
 
 223  
     public void setHasWaitlist(Boolean hasWaitlist) {
 224  0
         this.hasWaitlist = hasWaitlist;
 225  0
     }
 226  
 
 227  
     public void setWaitlistTypeKey(String waitlistTypeKey) {
 228  0
         this.waitlistTypeKey = waitlistTypeKey;
 229  0
     }
 230  
 
 231  
     public void setWaitlistMaximum(Integer waitlistMaximum) {
 232  0
         this.waitlistMaximum = waitlistMaximum;
 233  0
     }
 234  
 
 235  
     public void setIsWaitlistCheckinRequired(Boolean isWaitlistCheckinRequired) {
 236  0
         this.isWaitlistCheckinRequired = isWaitlistCheckinRequired;
 237  0
     }
 238  
 
 239  
     public void setWaitlistCheckinFrequency(TimeAmountInfo waitlistCheckinFrequency) {
 240  0
         this.waitlistCheckinFrequency = waitlistCheckinFrequency;
 241  0
     }
 242  
 }