1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.core.organization.assembly.data.client; |
17 | |
|
18 | |
|
19 | |
import org.kuali.student.common.assembly.data.Data; |
20 | |
import org.kuali.student.common.assembly.helper.PropertyEnum; |
21 | |
|
22 | |
|
23 | |
public class RuntimeDataVersionsHelper |
24 | |
{ |
25 | |
private static final long serialVersionUID = 1; |
26 | |
|
27 | 0 | public enum Properties implements PropertyEnum |
28 | |
{ |
29 | 0 | TYPE ("type"), |
30 | 0 | ID ("id"), |
31 | 0 | VERSION_IND ("versionInd"); |
32 | |
|
33 | |
private final String key; |
34 | |
|
35 | |
private Properties (final String key) |
36 | 0 | { |
37 | 0 | this.key = key; |
38 | 0 | } |
39 | |
|
40 | |
@Override |
41 | |
public String getKey () |
42 | |
{ |
43 | 0 | return this.key; |
44 | |
} |
45 | |
} |
46 | |
private Data data; |
47 | |
|
48 | |
private RuntimeDataVersionsHelper (Data data) |
49 | 0 | { |
50 | 0 | this.data = data; |
51 | 0 | } |
52 | |
|
53 | |
public static RuntimeDataVersionsHelper wrap (Data data) |
54 | |
{ |
55 | 0 | if (data == null) |
56 | |
{ |
57 | 0 | return null; |
58 | |
} |
59 | 0 | return new RuntimeDataVersionsHelper (data); |
60 | |
} |
61 | |
|
62 | |
public Data getData () |
63 | |
{ |
64 | 0 | return data; |
65 | |
} |
66 | |
|
67 | |
|
68 | |
public void setType (String value) |
69 | |
{ |
70 | 0 | data.set (Properties.TYPE.getKey (), value); |
71 | 0 | } |
72 | |
|
73 | |
|
74 | |
public String getType () |
75 | |
{ |
76 | 0 | return (String) data.get (Properties.TYPE.getKey ()); |
77 | |
} |
78 | |
|
79 | |
|
80 | |
public void setId (String value) |
81 | |
{ |
82 | 0 | data.set (Properties.ID.getKey (), value); |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
public String getId () |
87 | |
{ |
88 | 0 | return (String) data.get (Properties.ID.getKey ()); |
89 | |
} |
90 | |
|
91 | |
|
92 | |
public void setVersionInd (String value) |
93 | |
{ |
94 | 0 | data.set (Properties.VERSION_IND.getKey (), value); |
95 | 0 | } |
96 | |
|
97 | |
|
98 | |
public String getVersionInd () |
99 | |
{ |
100 | 0 | return (String) data.get (Properties.VERSION_IND.getKey ()); |
101 | |
} |
102 | |
|
103 | |
} |
104 | |
|