Coverage Report - org.kuali.student.r2.lum.course.dto.CourseRevenueInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CourseRevenueInfo
0%
0/18
0%
0/6
1.5
 
 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.IdNamelessEntityInfo;
 24  
 import org.kuali.student.r2.lum.course.infc.CourseRevenue;
 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  
  * Detailed information about revenue collected from the course.
 31  
  * 
 32  
  * @Author KSContractMojo
 33  
  * @Author Daniel Epstein
 34  
  * @Since Mon Jul 26 14:12:38 EDT 2010
 35  
  * @See <a href=
 36  
  *      "https://test.kuali.org/confluence/display/KULSTU/courseRevenueInfo+Structure"
 37  
  *      >CourseReenueInfo</>
 38  
  */
 39  
 
 40  
 @XmlType(name = "CourseRevenueInfo", propOrder = {"id", "typeKey", "stateKey", "affiliatedOrgs", "feeType", "meta", "attributes", "_futureElements"})
 41  
 @XmlAccessorType(XmlAccessType.FIELD)
 42  
 public class CourseRevenueInfo extends IdNamelessEntityInfo implements CourseRevenue, Serializable {
 43  
 
 44  
     private static final long serialVersionUID = 1L;
 45  
 
 46  
     @XmlElement
 47  
     private String feeType;
 48  
 
 49  
     @XmlElement
 50  
     private List<AffiliatedOrgInfo> affiliatedOrgs;
 51  
 
 52  
     @XmlAnyElement
 53  
     private List<Element> _futureElements;
 54  
 
 55  0
     public CourseRevenueInfo() {
 56  
 
 57  0
     }
 58  
 
 59  
     public CourseRevenueInfo(CourseRevenue courseRevenue) {
 60  0
         super(courseRevenue);
 61  0
         if (courseRevenue != null) {
 62  0
             this.feeType = courseRevenue.getFeeType();
 63  0
             List<AffiliatedOrgInfo> affilatedOrgs = new ArrayList<AffiliatedOrgInfo>();
 64  
 
 65  0
             for (AffiliatedOrg affiliatedOrg : courseRevenue.getAffiliatedOrgs()) {
 66  0
                 affilatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
 67  
 
 68  
             }
 69  0
             this.affiliatedOrgs = affilatedOrgs;
 70  
         }
 71  0
     }
 72  
 
 73  
     /**
 74  
      * A code that identifies the type of the fee with which this revenue is
 75  
      * associated with.
 76  
      */
 77  
     @Override
 78  
     public String getFeeType() {
 79  0
         return feeType;
 80  
     }
 81  
 
 82  
     public void setFeeType(String feeType) {
 83  0
         this.feeType = feeType;
 84  0
     }
 85  
 
 86  
     /**
 87  
      * List of affiliated organizations.
 88  
      */
 89  
     @Override
 90  
     public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
 91  0
         if (affiliatedOrgs == null) {
 92  0
             affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
 93  
         }
 94  0
         return affiliatedOrgs;
 95  
     }
 96  
 
 97  
     public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
 98  0
         this.affiliatedOrgs = affiliatedOrgs;
 99  0
     }
 100  
 
 101  
 }