Clover Coverage Report - Kuali Student 1.1.0-M10-SNAPSHOT (Aggregated)
Coverage timestamp: Fri Dec 17 2010 05:04:51 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
18   149   17   1.12
2   80   0.94   16
16     1.06  
1    
 
  EnumeratedValueInfo       Line # 32 18 0% 17 2 94.4% 0.9444444
 
  (5)
 
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.core.enumerationmanagement.dto;
17   
18    import java.io.Serializable;
19    import java.util.ArrayList;
20    import java.util.Date;
21    import java.util.List;
22   
23    import javax.xml.bind.annotation.XmlAccessType;
24    import javax.xml.bind.annotation.XmlAccessorType;
25    import javax.xml.bind.annotation.XmlAttribute;
26    import javax.xml.bind.annotation.XmlElement;
27   
28    /**
29    *Value associated with a particular enumeration.
30    */
31    @XmlAccessorType(XmlAccessType.FIELD)
 
32    public class EnumeratedValueInfo implements Serializable {
33   
34    private static final long serialVersionUID = 1L;
35   
36    @XmlElement
37    private String code;
38   
39    @XmlElement
40    private String abbrevValue;
41   
42    @XmlElement
43    private String value;
44   
45    @XmlElement
46    private Date effectiveDate;
47   
48    @XmlElement
49    private Date expirationDate;
50   
51    @XmlElement
52    private String sortKey;
53   
54    @XmlElement
55    private List<EnumContextValueInfo> contexts;
56   
57    @XmlAttribute
58    private String enumerationKey;
59   
60    /**
61    * Typically coincides with a code representation. Likely the key if this is a reference to another object.
62    */
 
63  52 toggle public String getCode() {
64  52 return code;
65    }
66   
 
67  88 toggle public void setCode(String code) {
68  88 this.code = code;
69    }
70   
71    /**
72    * Typically coincides with a shortened name. May be equal to the code or value fields.
73    */
 
74  52 toggle public String getAbbrevValue() {
75  52 return abbrevValue;
76    }
77   
 
78  87 toggle public void setAbbrevValue(String abbrevValue) {
79  87 this.abbrevValue = abbrevValue;
80    }
81   
82    /**
83    * Typically coincides with a name for display.
84    */
 
85  72 toggle public String getValue() {
86  72 return value;
87    }
88   
 
89  88 toggle public void setValue(String value) {
90  88 this.value = value;
91    }
92   
93    /**
94    * Date that this enumerated value became effective. If referring to another object, this may correspond with the effective date, created date, date of a state transition, or some arbitrarily defined date. For code/value pairs with no dates, the current date may be returned.
95    */
 
96  52 toggle public Date getEffectiveDate() {
97  52 return effectiveDate;
98    }
99   
 
100  87 toggle public void setEffectiveDate(Date effectiveDate) {
101  87 this.effectiveDate = effectiveDate;
102    }
103   
104    /**
105    * Date that this enumerated value expires. If referring to another object, this may correspond with the expiration date, date of a state transition, or some arbitrarily defined date. If this field is not specified, then no expiration date has been currently defined. For code/value pairs with no dates, this date may not be specified.
106    */
 
107  52 toggle public Date getExpirationDate() {
108  52 return expirationDate;
109    }
110   
 
111  87 toggle public void setExpirationDate(Date expirationDate) {
112  87 this.expirationDate = expirationDate;
113    }
114   
115    /**
116    * Default position for the enumerated value. This might or might not exist, particularly in cases where the enumeration consists solely of a view.
117    */
 
118  52 toggle public String getSortKey() {
119  52 return sortKey;
120    }
121   
 
122  87 toggle public void setSortKey(String sortKey) {
123  87 this.sortKey = sortKey;
124    }
125   
126    /**
127    * Indicates which context types and values this particular enumerated value participates in.
128    */
 
129  51 toggle public List<EnumContextValueInfo> getContexts() {
130  51 if (contexts == null) {
131  0 contexts = new ArrayList<EnumContextValueInfo>();
132    }
133  51 return contexts;
134    }
135   
 
136  87 toggle public void setContexts(List<EnumContextValueInfo> contexts) {
137  87 this.contexts = contexts;
138    }
139   
 
140  24 toggle public String getEnumerationKey() {
141  24 return enumerationKey;
142    }
143   
 
144  87 toggle public void setEnumerationKey(String enumerationKey) {
145  87 this.enumerationKey = enumerationKey;
146    }
147   
148   
149    }