Coverage Report - org.kuali.student.r2.lum.clu.dto.ExpenditureInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ExpenditureInfo
0%
0/18
0%
0/6
1.5
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * 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 implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.student.r2.lum.clu.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
 19  
 import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg;
 20  
 import org.kuali.student.r2.lum.clu.infc.Expenditure;
 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.XmlAttribute;
 27  
 import javax.xml.bind.annotation.XmlElement;
 28  
 import javax.xml.bind.annotation.XmlType;
 29  
 import java.io.Serializable;
 30  
 import java.util.ArrayList;
 31  
 import java.util.List;
 32  
 
 33  
 @XmlAccessorType(XmlAccessType.FIELD)
 34  
 @XmlType(name = "ExpenditureInfo", propOrder = {"id", "affiliatedOrgs",
 35  
         "attributes", "meta", "_futureElements"})
 36  
 public class ExpenditureInfo extends HasAttributesAndMetaInfo implements Expenditure, Serializable {
 37  
 
 38  
     private static final long serialVersionUID = 1L;
 39  
 
 40  
     @XmlAttribute
 41  
     private String id;
 42  
     @XmlElement
 43  
     private List<AffiliatedOrgInfo> affiliatedOrgs;
 44  
     @XmlAnyElement
 45  
     private List<Element> _futureElements;
 46  
 
 47  0
     public ExpenditureInfo() {
 48  0
         this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
 49  0
     }
 50  
 
 51  
     public ExpenditureInfo(Expenditure expenditure) {
 52  0
         super(expenditure);
 53  0
         if (null != expenditure) {
 54  0
             this.id = expenditure.getId();
 55  0
             this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
 56  0
             for (AffiliatedOrg affiliatedOrg : expenditure.getAffiliatedOrgs()) {
 57  0
                 this.affiliatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
 58  
             }
 59  
         }
 60  0
     }
 61  
 
 62  
     @Override
 63  
     public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
 64  0
         if (affiliatedOrgs == null) {
 65  0
             affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
 66  
         }
 67  0
         return affiliatedOrgs;
 68  
     }
 69  
 
 70  
     public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
 71  0
         this.affiliatedOrgs = affiliatedOrgs;
 72  0
     }
 73  
 
 74  
     @Override
 75  
     public String getId() {
 76  0
         return id;
 77  
     }
 78  
 
 79  
     public void setId(String id) {
 80  0
         this.id = id;
 81  0
     }
 82  
 }