1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.assembly.helper; |
17 |
|
|
18 |
|
|
19 |
|
import org.kuali.student.common.assembly.data.Data; |
20 |
|
|
21 |
|
|
22 |
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 12 |
Complexity Density: 0.92 |
|
23 |
|
public class RuntimeDataHelper |
24 |
|
{ |
25 |
|
private static final long serialVersionUID = 1; |
26 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
27 |
|
public enum Properties implements PropertyEnum |
28 |
|
{ |
29 |
|
CREATED ("created"), |
30 |
|
DELETED ("deleted"), |
31 |
|
UPDATED ("updated"), |
32 |
|
VERSIONS ("versions"); |
33 |
|
|
34 |
|
private final String key; |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
36 |
0
|
private Properties (final String key)... |
37 |
|
{ |
38 |
0
|
this.key = key; |
39 |
|
} |
40 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
41 |
0
|
@Override... |
42 |
|
public String getKey () |
43 |
|
{ |
44 |
0
|
return this.key; |
45 |
|
} |
46 |
|
} |
47 |
|
private Data data; |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0
|
private RuntimeDataHelper (Data data)... |
50 |
|
{ |
51 |
0
|
this.data = data; |
52 |
|
} |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
54 |
0
|
public static RuntimeDataHelper wrap (Data data)... |
55 |
|
{ |
56 |
0
|
if (data == null) |
57 |
|
{ |
58 |
0
|
return null; |
59 |
|
} |
60 |
0
|
return new RuntimeDataHelper (data); |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public Data getData ()... |
64 |
|
{ |
65 |
0
|
return data; |
66 |
|
} |
67 |
|
|
68 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
69 |
0
|
public void setCreated (Boolean value)... |
70 |
|
{ |
71 |
0
|
data.set (Properties.CREATED.getKey (), value); |
72 |
|
} |
73 |
|
|
74 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
75 |
0
|
public Boolean isCreated ()... |
76 |
|
{ |
77 |
0
|
return (Boolean) data.get (Properties.CREATED.getKey ()); |
78 |
|
} |
79 |
|
|
80 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
0
|
public void setDeleted (Boolean value)... |
82 |
|
{ |
83 |
0
|
data.set (Properties.DELETED.getKey (), value); |
84 |
|
} |
85 |
|
|
86 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
0
|
public Boolean isDeleted ()... |
88 |
|
{ |
89 |
0
|
return (Boolean) data.get (Properties.DELETED.getKey ()); |
90 |
|
} |
91 |
|
|
92 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
0
|
public void setUpdated (Boolean value)... |
94 |
|
{ |
95 |
0
|
data.set (Properties.UPDATED.getKey (), value); |
96 |
|
} |
97 |
|
|
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0
|
public Boolean isUpdated ()... |
100 |
|
{ |
101 |
0
|
return (Boolean) data.get (Properties.UPDATED.getKey ()); |
102 |
|
} |
103 |
|
|
104 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
105 |
0
|
public void setVersions (Data value)... |
106 |
|
{ |
107 |
0
|
data.set (Properties.VERSIONS.getKey (), value); |
108 |
|
} |
109 |
|
|
110 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
0
|
public Data getVersions ()... |
112 |
|
{ |
113 |
0
|
return (Data) data.get (Properties.VERSIONS.getKey ()); |
114 |
|
} |
115 |
|
|
116 |
|
} |
117 |
|
|