Coverage Report - org.kuali.student.r2.lum.lrc.dto.ResultValuesGroupInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ResultValuesGroupInfo
0%
0/35
0%
0/8
1.333
 
 1  
 /*
 2  
  * Copyright 2007 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.lrc.dto;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.Date;
 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.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 
 28  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 29  
 import org.kuali.student.r2.lum.lrc.infc.ResultValuesGroup;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 /**
 33  
  * Detailed information about a group of result values.
 34  
  * 
 35  
  * This grouping can be expressed two ways:
 36  
  * (1) as an explicit list of values, i.e. A, B, C, etc
 37  
  * (2) as a range of numeric values 1-100 with .01 increments
 38  
  * 
 39  
  * It may also combine the two approaches.  (3) A numeric range for a
 40  
  * grade 1-100 but also allow for grades like I for incomplete.
 41  
  * 
 42  
  * Note: This object has been renamed from R1, previously it was
 43  
  * called ResultComponent.
 44  
  * 
 45  
  * @Author sambit
 46  
  * @Since Tue Apr 21 13:47:47 PDT 2009
 47  
  */
 48  0
 @XmlAccessorType(XmlAccessType.FIELD)
 49  
 @XmlType(name = "GradeValuesGroupInfo", propOrder = {
 50  
     "key", "typeKey", "stateKey", "name", "descr", "resultScaleKey",
 51  
     "resultValueKeys", "resultValueRange", "effectiveDate",
 52  
     "expirationDate", "meta", "attributes", "_futureElements"})
 53  
 public class ResultValuesGroupInfo
 54  
         extends KeyEntityInfo
 55  
         implements ResultValuesGroup {
 56  
 
 57  
     private static final long serialVersionUID = 1L;
 58  
     @XmlElement
 59  
     private String resultScaleKey;
 60  
     @XmlElement
 61  
     private List<String> resultValueKeys;
 62  
     @XmlElement
 63  
     private ResultValueRangeInfo resultValueRange;
 64  
     @XmlElement
 65  
     private Date effectiveDate;
 66  
     @XmlElement
 67  
     private Date expirationDate;
 68  
     @XmlAnyElement
 69  
     private List<Element> _futureElements;
 70  
 
 71  0
     public ResultValuesGroupInfo() {
 72  0
         resultScaleKey = null;
 73  0
         resultValueKeys = new ArrayList<String>();
 74  0
         resultValueRange = null;
 75  0
         effectiveDate = null;
 76  0
         expirationDate = null;
 77  0
     }
 78  
 
 79  
     public ResultValuesGroupInfo(ResultValuesGroup orig) {
 80  0
         super(orig);
 81  0
         if (null != orig) {
 82  0
             this.resultScaleKey = orig.getResultScaleKey();
 83  0
             this.resultValueKeys = new ArrayList<String>(orig.getResultValueKeys());
 84  0
             this.resultValueRange = new ResultValueRangeInfo(orig.getResultValueRange());
 85  0
             if (orig.getEffectiveDate() != null) {
 86  0
                 this.effectiveDate = new Date(orig.getEffectiveDate().getTime());
 87  
             }
 88  0
             if (orig.getExpirationDate() != null) {
 89  0
                 this.expirationDate = new Date(orig.getExpirationDate().getTime());
 90  
             }
 91  
         }
 92  0
     }
 93  
 
 94  
     @Override
 95  
     public String getResultScaleKey() {
 96  0
         return resultScaleKey;
 97  
     }
 98  
 
 99  
     public void setResultScaleKey(String resultScaleKey) {
 100  0
         this.resultScaleKey = resultScaleKey;
 101  0
     }
 102  
 
 103  
     @Override
 104  
     public List<String> getResultValueKeys() {
 105  0
         if (this.resultValueKeys == null) {
 106  0
             this.resultValueKeys = new ArrayList<String>();
 107  
         }
 108  0
         return resultValueKeys;
 109  
     }
 110  
 
 111  
     public void setResultValueKeys(List<String> resultValueKeys) {
 112  0
         this.resultValueKeys = resultValueKeys;
 113  0
     }
 114  
 
 115  
     @Override
 116  
     public ResultValueRangeInfo getResultValueRange() {
 117  0
         return resultValueRange;
 118  
     }
 119  
 
 120  
     public void setResultValueRange(ResultValueRangeInfo resultValueRange) {
 121  0
         this.resultValueRange = resultValueRange;
 122  0
     }
 123  
 
 124  
     @Override
 125  
     public Date getEffectiveDate() {
 126  0
         return effectiveDate;
 127  
     }
 128  
 
 129  
     public void setEffectiveDate(Date effectiveDate) {
 130  0
         this.effectiveDate = effectiveDate;
 131  0
     }
 132  
 
 133  
     @Override
 134  
     public Date getExpirationDate() {
 135  0
         return expirationDate;
 136  
     }
 137  
 
 138  
     public void setExpirationDate(Date expirationDate) {
 139  0
         this.expirationDate = expirationDate;
 140  0
     }
 141  
 }