001/**
002 * Copyright 2010 The Kuali Foundation 
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the
005 * "License"); you may not use this file except in compliance with the
006 * License. You may obtain a copy of the License at
007 *
008 * http://www.osedu.org/licenses/ECL-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
013 * implied. See the License for the specific language governing
014 * permissions and limitations under the License.
015 */
016
017package org.kuali.student.r2.common.dto;
018
019import java.io.Serializable;
020import java.util.List;
021
022import javax.xml.bind.annotation.XmlAccessType;
023import javax.xml.bind.annotation.XmlAccessorType;
024import javax.xml.bind.annotation.XmlAnyElement;
025import javax.xml.bind.annotation.XmlElement;
026import javax.xml.bind.annotation.XmlType;
027
028import org.kuali.student.r2.common.infc.TimeAmount;
029//import org.w3c.dom.Element;
030
031/**
032 * Information about a time amount.
033 *
034 * @author tom
035 */
036
037@XmlAccessorType(XmlAccessType.FIELD)
038@XmlType(name = "TimeAmountInfo", propOrder = {
039                 "atpDurationTypeKey", "timeQuantity", "_futureElements" }) 
040
041public class TimeAmountInfo 
042    implements TimeAmount, Serializable {
043        
044    private static final long serialVersionUID = 1L;
045    
046    @XmlElement
047    private String atpDurationTypeKey; 
048    
049    @XmlElement
050    private Integer timeQuantity; 
051    
052    @XmlAnyElement
053    private List<Object> _futureElements;   
054    
055    
056    /**
057     * Constructs a new TimeAmountInfo.
058     */
059    public TimeAmountInfo() {
060    }
061    
062    /**
063     * Constructs a new TimeAmountInfo from another TimeAmount.
064     *
065     * @param timeAmount the TimeAmount to copy
066     */
067    public TimeAmountInfo(TimeAmount timeAmount) {           
068        
069        if (timeAmount != null) {
070            this.atpDurationTypeKey = timeAmount.getAtpDurationTypeKey();
071            this.timeQuantity = timeAmount.getTimeQuantity();
072        }
073    }
074
075    @Override
076    public String getAtpDurationTypeKey(){
077        return atpDurationTypeKey;
078    }
079
080    public void setAtpDurationTypeKey(String atpDurationTypeKey) {
081        this.atpDurationTypeKey = atpDurationTypeKey;
082    }
083        
084    @Override
085    public Integer getTimeQuantity(){
086        return timeQuantity;
087    }
088
089    public void setTimeQuantity(Integer timeQuantity) {
090        this.timeQuantity = timeQuantity;
091    }
092}