Coverage Report - org.kuali.student.enrollment.courseregistration.dto.RegistrationRequestInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
RegistrationRequestInfo
0%
0/21
0%
0/6
1.375
 
 1  
 /*
 2  
  * Copyright 2011 The Kuali Foundation 
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.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.osedu.org/licenses/ECL-2.0
 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.courseregistration.dto;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.ArrayList;
 21  
 import java.util.List;
 22  
 
 23  
 import javax.xml.bind.annotation.XmlAccessType;
 24  
 import javax.xml.bind.annotation.XmlAccessorType;
 25  
 import javax.xml.bind.annotation.XmlAnyElement;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.enrollment.courseregistration.infc.RegistrationRequest;
 30  
 import org.kuali.student.enrollment.courseregistration.infc.RegistrationRequestItem;
 31  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 32  
 import org.w3c.dom.Element;
 33  
 
 34  
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "RegistrationRequestInfo", propOrder = {
 36  
                 "id", "name", "descr", "typeKey", "stateKey", 
 37  
                 "requestorId", "termId", "registrationRequestItems", 
 38  
                 "meta", "attributes", "_futureElements"})
 39  
 
 40  
 public class RegistrationRequestInfo 
 41  
     extends IdEntityInfo 
 42  
     implements RegistrationRequest, Serializable {
 43  
 
 44  
     private static final long serialVersionUID = 1L;
 45  
 
 46  
     @XmlElement
 47  
     private String requestorId;
 48  
 
 49  
     @XmlElement
 50  
     private String termId;
 51  
 
 52  
     @XmlElement
 53  
     private List<RegistrationRequestItemInfo> registrationRequestItems;
 54  
 
 55  
     @XmlAnyElement
 56  
     private List<Element> _futureElements;
 57  
 
 58  
 
 59  
     /**
 60  
      * Constructs a new RegistrationRequestInfo.
 61  
      */
 62  0
     public RegistrationRequestInfo() { 
 63  0
     }
 64  
 
 65  
     /**
 66  
      * Constructs a new RegistrationRequestInfo from another
 67  
      * RegistrationRequest.
 68  
      *
 69  
      * @param registrationRequest the RegistrationRequest to copy
 70  
      */
 71  
     public RegistrationRequestInfo(RegistrationRequest registrationRequest) {
 72  0
         super(registrationRequest);
 73  
 
 74  0
         if (registrationRequest != null) {
 75  0
             this.requestorId = registrationRequest.getRequestorId();
 76  0
             this.termId = registrationRequest.getTermId();
 77  0
             this.registrationRequestItems = new ArrayList<RegistrationRequestItemInfo>();
 78  
       
 79  0
             for (RegistrationRequestItem registrationRequestItem : registrationRequest.getRegistrationRequestItems()) {
 80  0
                 this.registrationRequestItems.add(new RegistrationRequestItemInfo(registrationRequestItem));
 81  
             }
 82  
         }
 83  0
     }
 84  
 
 85  
     @Override
 86  
     public String getRequestorId() {
 87  0
         return requestorId;
 88  
     }
 89  
 
 90  
     public void setRequestorId(String requestorId) {
 91  0
         this.requestorId = requestorId;
 92  0
     }
 93  
 
 94  
     @Override
 95  
     public String getTermId() {
 96  0
         return termId;
 97  
     }
 98  
 
 99  
     public void setTermId(String termId) {
 100  0
         this.termId = termId;
 101  0
     }
 102  
 
 103  
     @Override
 104  
     public List<RegistrationRequestItemInfo> getRegistrationRequestItems() {
 105  0
         if (this.registrationRequestItems == null) {
 106  0
             this.registrationRequestItems = new ArrayList<RegistrationRequestItemInfo>();
 107  
         }
 108  
 
 109  0
         return registrationRequestItems;
 110  
     }
 111  
 
 112  
     public void setRegistrationRequestItems(List<RegistrationRequestItemInfo> registrationRequestItems) {
 113  0
         this.registrationRequestItems = registrationRequestItems;
 114  0
     }
 115  
 }