Coverage Report - org.kuali.student.r2.lum.classI.lrc.dto.ScaleInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ScaleInfo
0%
0/17
N/A
1
 
 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.Date;
 19  
 
 20  
 import javax.xml.bind.annotation.XmlAccessType;
 21  
 import javax.xml.bind.annotation.XmlAccessorType;
 22  
 import javax.xml.bind.annotation.XmlAttribute;
 23  
 import javax.xml.bind.annotation.XmlElement;
 24  
 
 25  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 26  
 import org.kuali.student.r2.common.infc.RichText;
 27  
 import org.kuali.student.r2.lum.classI.lrc.Scale;
 28  
 
 29  
 /**
 30  
  * Detailed information about a result scale.
 31  
  * 
 32  
  * @Author sambit
 33  
  * @Since
 34  
  * 
 35  
  * 
 36  
  */
 37  
 @XmlAccessorType(XmlAccessType.FIELD)
 38  
 public class ScaleInfo extends KeyEntityInfo implements Scale {
 39  
 
 40  
         private static final long serialVersionUID = 1L;
 41  
 
 42  
         @XmlElement
 43  
         private Date effectiveDate;
 44  
 
 45  
         @XmlElement
 46  
         private Date expirationDate;
 47  
 
 48  
         @XmlAttribute
 49  
         private String id;
 50  
 
 51  0
         public ScaleInfo() {
 52  
 
 53  0
         }
 54  
 
 55  
         public ScaleInfo(String name, RichText descr, String key, String typeKey,
 56  
                         String stateKey, Date effectiveDate, Date expirationDate, String id) {
 57  
                 // TODO once devs make objects mutable
 58  0
                 super();
 59  0
                 this.effectiveDate = effectiveDate;
 60  0
                 this.expirationDate = expirationDate;
 61  0
                 this.id = id;
 62  0
         }
 63  
 
 64  
         public ScaleInfo createNewScaleInfoFromScaleInfo(ScaleInfo scaleInfo) {
 65  
 
 66  0
                 return new ScaleInfo(scaleInfo.getName(), scaleInfo.getDescr(),
 67  
                                 scaleInfo.getKey(), scaleInfo.getTypeKey(),
 68  
                                 scaleInfo.getStateKey(), scaleInfo.getEffectiveDate(),
 69  
                                 scaleInfo.getExpirationDate(), scaleInfo.getId());
 70  
         }
 71  
 
 72  
         /**
 73  
          * Date and time that this scale became effective. This is a similar concept
 74  
          * to the effective date on enumerated values. When an expiration date has
 75  
          * been specified, this field must be less than or equal to the expiration
 76  
          * date.
 77  
          */
 78  
         public Date getEffectiveDate() {
 79  0
                 return effectiveDate;
 80  
         }
 81  
 
 82  
         public void setEffectiveDate(Date effectiveDate) {
 83  0
                 this.effectiveDate = effectiveDate;
 84  0
         }
 85  
 
 86  
         /**
 87  
          * Date and time that this scale expires. This is a similar concept to the
 88  
          * expiration date on enumerated values. If specified, this should be
 89  
          * greater than or equal to the effective date. If this field is not
 90  
          * specified, then no expiration date has been currently defined and should
 91  
          * automatically be considered greater than the effective date.
 92  
          */
 93  
         public Date getExpirationDate() {
 94  0
                 return expirationDate;
 95  
         }
 96  
 
 97  
         public void setExpirationDate(Date expirationDate) {
 98  0
                 this.expirationDate = expirationDate;
 99  0
         }
 100  
 
 101  
         /**
 102  
          * Unique identifier for a scale.
 103  
          */
 104  
         public String getId() {
 105  0
                 return id;
 106  
         }
 107  
 
 108  
         public void setId(String id) {
 109  0
                 this.id = id;
 110  0
         }
 111  
 }