Coverage Report - org.kuali.student.r2.core.scheduling.dto.ScheduleRequestInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ScheduleRequestInfo
0%
0/21
0%
0/6
1.5
 
 1  
 /*
 2  
  * Copyright 2012 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  
 
 16  
 package org.kuali.student.r2.core.scheduling.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 19  
 import org.kuali.student.r2.core.scheduling.infc.ScheduleRequest;
 20  
 import org.kuali.student.r2.core.scheduling.infc.ScheduleRequestComponent;
 21  
 import org.w3c.dom.Element;
 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  
 import java.io.Serializable;
 29  
 import java.util.ArrayList;
 30  
 import java.util.List;
 31  
 
 32  
 /**
 33  
  * @Version 2.0
 34  
  * @Author Sri komandur@uw.edu
 35  
  */
 36  
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "ScheduleRequestInfo", propOrder = {"id", "typeKey", "stateKey", "name", "descr",
 38  
         "refObjectId", "refObjectTypeKey", "scheduleRequestComponents",
 39  
         "meta", "attributes", "_futureElements"})
 40  
 public class ScheduleRequestInfo extends IdEntityInfo implements ScheduleRequest, Serializable {
 41  
 
 42  
     @XmlElement
 43  
     private String refObjectId;
 44  
     @XmlElement
 45  
     private String refObjectTypeKey;
 46  
     @XmlElement
 47  
     private List<ScheduleRequestComponentInfo> scheduleRequestComponents;
 48  
     @XmlAnyElement
 49  
     private List<Element> _futureElements;
 50  
 
 51  0
     public ScheduleRequestInfo() {
 52  0
     }
 53  
 
 54  0
     public ScheduleRequestInfo(ScheduleRequest scheduleRequest) {
 55  0
         if (null != scheduleRequest) {
 56  0
             this.refObjectId = scheduleRequest.getRefObjectId();
 57  0
             this.refObjectTypeKey = scheduleRequest.getRefObjectTypeKey();
 58  0
             this.scheduleRequestComponents = new ArrayList<ScheduleRequestComponentInfo>();
 59  0
             for(ScheduleRequestComponent component : scheduleRequest.getScheduleRequestComponents()) {
 60  0
                 this.scheduleRequestComponents.add(new ScheduleRequestComponentInfo(component));
 61  
             }
 62  
         }
 63  0
     }
 64  
 
 65  
     @Override
 66  
     public String getRefObjectTypeKey() {
 67  0
         return this.refObjectTypeKey;
 68  
     }
 69  
 
 70  
     public void setRefObjectTypeKey(String refObjectTypeKey) {
 71  0
         this.refObjectTypeKey = refObjectTypeKey;
 72  0
     }
 73  
 
 74  
     @Override
 75  
     public String getRefObjectId() {
 76  0
         return this.refObjectId;
 77  
     }
 78  
 
 79  
     public void setRefObjectId(String refObjectId) {
 80  0
         this.refObjectId = refObjectId;
 81  0
     }
 82  
 
 83  
     @Override
 84  
     public List<ScheduleRequestComponentInfo> getScheduleRequestComponents() {
 85  0
         if (null == this.scheduleRequestComponents) {
 86  0
             return new ArrayList<ScheduleRequestComponentInfo>();
 87  
         }
 88  
         else {
 89  0
             return this.scheduleRequestComponents;
 90  
         }
 91  
     }
 92  
 
 93  
     public void setScheduleRequestComponents(List<ScheduleRequestComponentInfo> scheduleRequestComponents) {
 94  0
         this.scheduleRequestComponents = scheduleRequestComponents;
 95  0
     }
 96  
 }