Coverage Report - org.kuali.student.r2.lum.course.dto.CourseExpenditureInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CourseExpenditureInfo
0%
0/14
0%
0/6
1.75
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation Licensed under the Educational Community
 3  
  * License, Version 1.0 (the "License"); you may not use this file except in
 4  
  * compliance with the License. You may obtain a copy of the License at
 5  
  * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
 6  
  * or agreed to in writing, software distributed under the License is
 7  
  * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 8  
  * KIND, either express or implied. See the License for the specific language
 9  
  * governing permissions and limitations under the License.
 10  
  */
 11  
 package org.kuali.student.r2.lum.course.dto;
 12  
 
 13  
 import java.io.Serializable;
 14  
 import java.util.ArrayList;
 15  
 import java.util.List;
 16  
 
 17  
 import javax.xml.bind.annotation.XmlAccessType;
 18  
 import javax.xml.bind.annotation.XmlAccessorType;
 19  
 import javax.xml.bind.annotation.XmlAnyElement;
 20  
 import javax.xml.bind.annotation.XmlElement;
 21  
 import javax.xml.bind.annotation.XmlType;
 22  
 
 23  
 import org.kuali.student.r2.common.dto.HasAttributesInfo;
 24  
 import org.kuali.student.r2.lum.course.infc.CourseExpenditure;
 25  
 import org.kuali.student.r2.lum.clu.dto.AffiliatedOrgInfo;
 26  
 import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg;
 27  
 import org.w3c.dom.Element;
 28  
 
 29  
 /**
 30  
  * @author Kuali Student Team (sambitpa@kuali.org)
 31  
  */
 32  
 @XmlType(name = "CourseExpenditureInfo", propOrder = {"affiliatedOrgs", "attributes", "_futureElements"})
 33  
 @XmlAccessorType(XmlAccessType.FIELD)
 34  
 public class CourseExpenditureInfo extends HasAttributesInfo implements CourseExpenditure, Serializable {
 35  
 
 36  
     private static final long serialVersionUID = 1L;
 37  
 
 38  
     @XmlElement
 39  
     private List<AffiliatedOrgInfo> affiliatedOrgs;
 40  
 
 41  
     @XmlAnyElement
 42  
     private List<Element> _futureElements;
 43  
 
 44  0
     public CourseExpenditureInfo() {
 45  
 
 46  0
     }
 47  
 
 48  
     public CourseExpenditureInfo(CourseExpenditure courseExpenditure) {
 49  0
         super(courseExpenditure);
 50  0
         if (courseExpenditure != null) {
 51  0
             List<AffiliatedOrgInfo> affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
 52  0
             for (AffiliatedOrg afflOrg : courseExpenditure.getAffiliatedOrgs()) {
 53  0
                 affiliatedOrgs.add(new AffiliatedOrgInfo(afflOrg));
 54  
             }
 55  0
             this.affiliatedOrgs = affiliatedOrgs;
 56  
         }
 57  0
     }
 58  
 
 59  
     @Override
 60  
     public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
 61  0
         if (affiliatedOrgs == null) {
 62  0
             affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
 63  
         }
 64  0
         return affiliatedOrgs;
 65  
     }
 66  
 
 67  
     public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
 68  0
         this.affiliatedOrgs = affiliatedOrgs;
 69  0
     }
 70  
 
 71  
 }