001 /*
002 * Copyright 2007 The Kuali Foundation Licensed under the Educational Community
003 * License, Version 1.0 (the "License"); you may not use this file except in
004 * compliance with the License. You may obtain a copy of the License at
005 * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
006 * or agreed to in writing, software distributed under the License is
007 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
008 * KIND, either express or implied. See the License for the specific language
009 * governing permissions and limitations under the License.
010 */
011 package org.kuali.student.r2.lum.lrc.dto;
012
013 import java.io.Serializable;
014 import java.util.Date;
015 import java.util.List;
016
017 import javax.xml.bind.annotation.XmlAccessType;
018 import javax.xml.bind.annotation.XmlAccessorType;
019 import javax.xml.bind.annotation.XmlAnyElement;
020 import javax.xml.bind.annotation.XmlElement;
021 import javax.xml.bind.annotation.XmlType;
022
023 import org.kuali.student.r2.common.dto.KeyEntityInfo;
024 import org.kuali.student.r2.lum.lrc.infc.ResultValue;
025 //import org.w3c.dom.Element;
026
027 @XmlAccessorType(XmlAccessType.FIELD)
028 @XmlType(name = "ResultValueInfo", propOrder = {"key", "typeKey", "stateKey",
029 "name", "descr", "resultScaleKey", "numericValue", "value",
030 "effectiveDate", "expirationDate", "meta", "attributes" })//, "_futureElements" }) TODO KSCM-372: Non-GWT translatable code
031
032 public class ResultValueInfo extends KeyEntityInfo implements ResultValue,
033 Serializable {
034
035 private static final long serialVersionUID = 1L;
036
037 @XmlElement
038 private String resultScaleKey;
039
040 @XmlElement
041 private String numericValue;
042
043 @XmlElement
044 private String value;
045
046 @XmlElement
047 private Date effectiveDate;
048
049 @XmlElement
050 private Date expirationDate;
051
052 // TODO KSCM-372: Non-GWT translatable code
053 // @XmlAnyElement
054 // private List<Element> _futureElements;
055
056 public ResultValueInfo() {
057 super();
058 }
059
060 public ResultValueInfo(ResultValue resultValueInfo) {
061 super(resultValueInfo);
062 if (null != resultValueInfo) {
063 this.resultScaleKey = resultValueInfo.getResultScaleKey();
064 this.numericValue = resultValueInfo.getNumericValue();
065 this.value = resultValueInfo.getValue();
066 if (resultValueInfo.getEffectiveDate() != null) {
067 this.effectiveDate = new Date(resultValueInfo.getEffectiveDate().getTime());
068 }
069 if (resultValueInfo.getExpirationDate() != null) {
070 this.expirationDate = new Date(resultValueInfo.getExpirationDate().getTime());
071 }
072 }
073 }
074
075 @Override
076 public String getResultScaleKey() {
077 return resultScaleKey;
078 }
079
080 public void setResultScaleKey(String resultScaleKey) {
081 this.resultScaleKey = resultScaleKey;
082 }
083
084 @Override
085 public String getNumericValue() {
086 return numericValue;
087 }
088
089 public void setNumericValue(String numericValue) {
090 this.numericValue = numericValue;
091 }
092
093 @Override
094 public String getValue() {
095 return value;
096 }
097
098 public void setValue(String value) {
099 this.value = value;
100 }
101
102 @Override
103 public Date getEffectiveDate() {
104 return effectiveDate;
105 }
106
107 public void setEffectiveDate(Date effectiveDate) {
108 this.effectiveDate = effectiveDate;
109 }
110
111 @Override
112 public Date getExpirationDate() {
113 return expirationDate;
114 }
115
116 public void setExpirationDate(Date expirationDate) {
117 this.expirationDate = expirationDate;
118 }
119 }