Clover Coverage Report - KS Common 1.2-M3-SNAPSHOT (Aggregated)
Coverage timestamp: Mon Jun 6 2011 05:37:04 EDT
../../../../../../../../img/srcFileCovDistChart7.png 32% of files have more coverage
9   79   9   1
0   47   1   9
9     1  
1    
 
  KeyValuePair       Line # 28 9 0% 9 6 66.7% 0.6666667
 
  (7)
 
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.common.ui.server.applicationstate.entity;
17   
18    import javax.persistence.Column;
19    import javax.persistence.Entity;
20    import javax.persistence.Id;
21    import javax.persistence.PrePersist;
22    import javax.persistence.Table;
23   
24    import org.kuali.student.common.util.UUIDHelper;
25   
26    @Entity
27    @Table(name = "KSAP_KEY_VALUE_T")
 
28    public class KeyValuePair {
29    @Id
30    @Column(name = "ID")
31    private String id;
32   
33    @Column(name = "APP_STATE_KEY", nullable=false)
34    private String key;
35   
36    @Column(name = "VALUE", length=2000, nullable=false)
37    private String value;
38   
 
39  4 toggle public KeyValuePair() {
40    }
41   
 
42  25 toggle public KeyValuePair(String key, String value) {
43  25 this.key = key;
44  25 this.value = value;
45    }
46   
47    /**
48    * AutoGenerate the Id
49    */
 
50  25 toggle @PrePersist
51    public void prePersist() {
52  25 this.id = UUIDHelper.genStringUUID(this.id);
53    }
54   
 
55  0 toggle public String getId() {
56  0 return id;
57    }
58   
 
59  11 toggle public String getKey() {
60  11 return key;
61    }
62   
 
63  0 toggle public void setKey(String key) {
64  0 this.key = key;
65    }
66   
 
67  11 toggle public String getValue() {
68  11 return value;
69    }
70   
 
71  0 toggle public void setValue(String value) {
72  0 this.value = value;
73    }
74   
 
75  16 toggle @Override
76    public String toString() {
77  16 return "KeyValuePair[id=" + id + ", key=" + key + ", value=" + value + "]";
78    }
79    }