Coverage Report - org.kuali.student.r2.common.dto.CurrencyAmountInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CurrencyAmountInfo
0%
0/23
0%
0/4
1.2
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation 
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License. You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.osedu.org/licenses/ECL-2.0
 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
 13  
  * implied. See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.r2.common.dto;
 18  
 
 19  
 import java.io.Serializable;
 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.infc.CurrencyAmount;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 /**
 33  
  * Detailed information about an amount of currency including both the
 34  
  * type of units and the quantity.
 35  
  *
 36  
  * @author Kamal
 37  
  * @since Mon Jan 11 15:20:51 PST 2010
 38  
  */
 39  
 
 40  0
 @XmlAccessorType(XmlAccessType.FIELD)
 41  
 @XmlType(name = "CurrencyAmountInfo", propOrder = {
 42  
                 "id", "currencyTypeKey", "currencyQuantity",
 43  
                 "meta", "_futureElements"})
 44  
 
 45  
 public class CurrencyAmountInfo 
 46  
     implements CurrencyAmount, Serializable {
 47  
 
 48  
     private static final long serialVersionUID = 1L;
 49  
 
 50  
     @XmlAttribute
 51  
     private String id;
 52  
     
 53  
     @XmlElement
 54  
     private String currencyTypeKey;
 55  
 
 56  
     @XmlElement
 57  
     private Integer currencyQuantity;
 58  
     
 59  
     @XmlElement
 60  
     private MetaInfo meta;
 61  
 
 62  
     @XmlAnyElement
 63  
     private List<Element> _futureElements;
 64  
 
 65  
     /**
 66  
      * Constructs a new CurrencyAmount.
 67  
      */
 68  0
     public CurrencyAmountInfo() {
 69  0
     }
 70  
 
 71  
     /**
 72  
      * Constructs a new CurrencyAmount from another Currency.
 73  
      *
 74  
      * @param currency the currency to copy
 75  
      */   
 76  0
     public CurrencyAmountInfo(CurrencyAmount currency) {
 77  0
         if (currency != null) {        
 78  0
             this.id = currency.getId();
 79  0
             this.currencyQuantity = currency.getCurrencyQuantity();
 80  0
             this.currencyTypeKey = currency.getCurrencyTypeKey();
 81  0
             if (currency.getMeta() != null ) {
 82  0
                 this.meta = new MetaInfo(currency.getMeta());
 83  
             }
 84  
         }
 85  0
     }
 86  
     
 87  
     @Override
 88  
     public String getId() {
 89  0
         return id;
 90  
     }
 91  
     
 92  
     public void setId(String id) {
 93  0
         this.id = id;
 94  0
     }
 95  
 
 96  
     @Override
 97  
     public String getCurrencyTypeKey() {
 98  0
         return currencyTypeKey;
 99  
     }
 100  
 
 101  
     public void setCurrencyTypeKey(String currencyTypeKey) {
 102  0
         this.currencyTypeKey = currencyTypeKey;
 103  0
     }
 104  
 
 105  
     @Override
 106  
     public Integer getCurrencyQuantity() {
 107  0
         return currencyQuantity;
 108  
     }
 109  
 
 110  
     public void setCurrencyQuantity(Integer currencyQuantity) {
 111  0
         this.currencyQuantity = currencyQuantity;
 112  0
     }
 113  
         
 114  
     @Override
 115  
     public MetaInfo getMeta() {
 116  0
         return this.meta;
 117  
     }
 118  
 
 119  
     public void setMeta(MetaInfo metaInfo) {
 120  0
         this.meta = metaInfo;
 121  0
     }        
 122  
 }