Coverage Report - org.kuali.student.r2.lum.lu.dto.FeeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
FeeInfo
0%
0/34
0%
0/8
1.417
 
 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.lu.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlAttribute;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.r2.common.dto.CurrencyAmountInfo;
 30  
 import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
 31  
 import org.kuali.student.r2.common.dto.RichTextInfo;
 32  
 import org.kuali.student.r2.lum.lu.infc.Fee;
 33  
 import org.w3c.dom.Element;
 34  
 
 35  
 
 36  0
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "FeeInfo", propOrder = {"feeType", "rateType", "feeAmounts",
 38  
         "descr", "id", "meta", "attributes", "_futureElements"})
 39  
 public class FeeInfo extends HasAttributesAndMetaInfo implements Fee, Serializable {
 40  
 
 41  
     private static final long serialVersionUID = 1L;
 42  
 
 43  
     @XmlElement
 44  
     private String feeType;
 45  
 
 46  
     @XmlElement
 47  
     private String rateType;
 48  
 
 49  
     @XmlElement
 50  
     private List<CurrencyAmountInfo> feeAmounts;
 51  
 
 52  
     @XmlElement
 53  
     private RichTextInfo descr;
 54  
 
 55  
     @XmlAttribute
 56  
     private String id;
 57  
 
 58  
     @XmlAnyElement
 59  
     private List<Element> _futureElements;
 60  
 
 61  0
     public FeeInfo() {
 62  0
         this.feeType = null;
 63  0
         this.rateType = null;
 64  0
         this.feeAmounts = new ArrayList<CurrencyAmountInfo>();
 65  0
         this.descr = null;
 66  0
         this.id = null;
 67  0
         this._futureElements = null;
 68  0
     }
 69  
     
 70  
     public FeeInfo(Fee fee) {
 71  0
         super(fee);
 72  
         
 73  0
         if(null == fee) return;
 74  
         
 75  0
         this.feeType = fee.getFeeType();
 76  0
         this.rateType = fee.getRateType();
 77  
 
 78  
         /* this needs a deep copy */
 79  0
         this.feeAmounts = (null != fee.getFeeAmounts()) ? new ArrayList<CurrencyAmountInfo>((List<CurrencyAmountInfo>)fee.getFeeAmounts()) : null;
 80  0
         this.id = fee.getId();
 81  0
         this.descr = (null != fee.getDescr()) ? new RichTextInfo(fee.getDescr() ) : null;
 82  0
     }
 83  
     
 84  
     @Override
 85  
     public String getFeeType() {
 86  0
         return feeType;
 87  
     }
 88  
 
 89  
     public void setFeeType(String feeType) {
 90  0
         this.feeType = feeType;
 91  0
     }
 92  
 
 93  
     @Override
 94  
     public String getRateType() {
 95  0
         return rateType;
 96  
     }
 97  
 
 98  
     public void setRateType(String rateType) {
 99  0
         this.rateType = rateType;
 100  0
     }
 101  
 
 102  
     @Override
 103  
     public List<CurrencyAmountInfo> getFeeAmounts() {
 104  0
         if (feeAmounts == null) {
 105  0
             feeAmounts = new ArrayList<CurrencyAmountInfo>(0);
 106  
         }
 107  0
         return feeAmounts;
 108  
     }
 109  
 
 110  
     public void setFeeAmounts(List<CurrencyAmountInfo> feeAmounts) {
 111  0
         this.feeAmounts = feeAmounts;
 112  0
     }
 113  
 
 114  
     @Override
 115  
     public RichTextInfo getDescr() {
 116  0
         return descr;
 117  
     }
 118  
 
 119  
     public void setDescr(RichTextInfo descr) {
 120  0
         this.descr = descr;
 121  0
     }
 122  
 
 123  
     @Override
 124  
     public String getId() {
 125  0
         return id;
 126  
     }
 127  
 
 128  
     public void setId(String id) {
 129  0
         this.id = id;
 130  0
     }
 131  
 }