Coverage Report - org.kuali.student.r2.lum.classI.lrc.dto.ResultValueGroupInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ResultValueGroupInfo
0%
0/27
0%
0/2
1.077
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.r2.lum.classI.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.XmlAttribute;
 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.classI.lrc.ResultValueGroup;
 30  
 import org.kuali.student.r2.lum.classI.lrc.ResultValueGroupType;
 31  
 
 32  
 /**
 33  
  * Detailed information about a result component.
 34  
  * 
 35  
  * @Author sambit
 36  
  * @Since Tue Apr 21 13:47:47 PDT 2009
 37  
  */
 38  
 
 39  
 @XmlType(name = "ResultValueGroupInfo", propOrder = { "key", "typeKey", "stateKey",
 40  
                 "name", "descr", "resultValues", "type",
 41  
                 "effectiveDate", "expirationDate", "id", "metaInfo", "attributes" })
 42  
 public class ResultValueGroupInfo extends KeyEntityInfo implements ResultValueGroup {
 43  
 
 44  
         private static final long serialVersionUID = 1L;
 45  
 
 46  
         @XmlElement
 47  
         private List<String> resultValues;
 48  
 
 49  
         @XmlElement
 50  
         private Date effectiveDate;
 51  
 
 52  
         @XmlElement
 53  
         private Date expirationDate;
 54  
 
 55  
         @XmlAttribute
 56  
         private ResultValueGroupType type;
 57  
 
 58  
         @XmlAttribute
 59  
         private String id;
 60  
 
 61  0
         public ResultValueGroupInfo() {
 62  
 
 63  0
         }
 64  
 
 65  
         public ResultValueGroupInfo(String id, List<String> resultValues, Date effectiveDate, Date expirationDate,
 66  
                         ResultValueGroupType type) {
 67  0
                 super();
 68  0
                 this.resultValues = resultValues;
 69  0
                 this.effectiveDate = effectiveDate;
 70  0
                 this.expirationDate = expirationDate;
 71  0
                 this.type = type;
 72  0
                 this.id = id;
 73  0
         }
 74  
 
 75  
         public static ResultValueGroupInfo createNewResultValueGroupInfoFromResultValueGroupInfo(
 76  
                         ResultValueGroupInfo resultValueGroupInfo) {
 77  0
                 return new ResultValueGroupInfo(resultValueGroupInfo.getId(),
 78  
                                 resultValueGroupInfo.getResultValues(),
 79  
                                 resultValueGroupInfo.getEffectiveDate(),
 80  
                                 resultValueGroupInfo.getExpirationDate(),
 81  
                                 resultValueGroupInfo.getType());
 82  
         }
 83  
 
 84  
 
 85  
         /**
 86  
          * List of result values
 87  
          */
 88  
         public List<String> getResultValues() {
 89  0
                 if (resultValues == null) {
 90  0
                         resultValues = new ArrayList<String>(0);
 91  
                 }
 92  0
                 return resultValues;
 93  
         }
 94  
 
 95  
         public void setResultValues(List<String> resultValues) {
 96  0
                 this.resultValues = resultValues;
 97  0
         }
 98  
 
 99  
         /**
 100  
          * Date and time that this result component became effective. This is a
 101  
          * similar concept to the effective date on enumerated values. When an
 102  
          * expiration date has been specified, this field must be less than or equal
 103  
          * to the expiration date.
 104  
          */
 105  
         public Date getEffectiveDate() {
 106  0
                 return effectiveDate;
 107  
         }
 108  
 
 109  
         public void setEffectiveDate(Date effectiveDate) {
 110  0
                 this.effectiveDate = effectiveDate;
 111  0
         }
 112  
 
 113  
         /**
 114  
          * Date and time that this result component expires. This is a similar
 115  
          * concept to the expiration date on enumerated values. If specified, this
 116  
          * should be greater than or equal to the effective date. If this field is
 117  
          * not specified, then no expiration date has been currently defined and
 118  
          * should automatically be considered greater than the effective date.
 119  
          */
 120  
         public Date getExpirationDate() {
 121  0
                 return expirationDate;
 122  
         }
 123  
 
 124  
         public void setExpirationDate(Date expirationDate) {
 125  0
                 this.expirationDate = expirationDate;
 126  0
         }
 127  
 
 128  
         /**
 129  
          * Unique identifier for a result component type.
 130  
          */
 131  
         public ResultValueGroupType getType() {
 132  0
                 return type;
 133  
         }
 134  
 
 135  
         public void setType(ResultValueGroupType type) {
 136  0
                 this.type = type;
 137  0
         }
 138  
 
 139  
         /**
 140  
          * Unique identifier for a result component. This is optional, due to the
 141  
          * identifier being set at the time of creation. Once the result component
 142  
          * has been created, this should be seen as required.
 143  
          */
 144  
         public String getId() {
 145  0
                 return id;
 146  
         }
 147  
 
 148  
         public void setId(String id) {
 149  0
                 this.id = id;
 150  0
         }
 151  
 
 152  
 }