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.core.assembly.data.Data; |
20 | |
import org.kuali.student.core.assembly.helper.PropertyEnum; |
21 | |
|
22 | |
|
23 | |
|
24 | |
public class OrgHelper |
25 | |
{ |
26 | |
private static final long serialVersionUID = 1; |
27 | |
|
28 | 0 | public enum Properties implements PropertyEnum |
29 | |
{ |
30 | 0 | TYPE ("type"), |
31 | 0 | NAME ("name"), |
32 | 0 | ABBR ("abbr"), |
33 | 0 | _RUNTIME_DATA ("_runtimeData"), |
34 | 0 | VERSIONS ("versions"); |
35 | |
|
36 | |
private final String key; |
37 | |
|
38 | |
private Properties (final String key) |
39 | 0 | { |
40 | 0 | this.key = key; |
41 | 0 | } |
42 | |
|
43 | |
@Override |
44 | |
public String getKey () |
45 | |
{ |
46 | 0 | return this.key; |
47 | |
} |
48 | |
} |
49 | |
private Data data; |
50 | |
|
51 | |
private OrgHelper (Data data) |
52 | 0 | { |
53 | 0 | this.data = data; |
54 | 0 | } |
55 | |
|
56 | |
public static OrgHelper wrap (Data data) |
57 | |
{ |
58 | 0 | if (data == null) |
59 | |
{ |
60 | 0 | return null; |
61 | |
} |
62 | 0 | return new OrgHelper (data); |
63 | |
} |
64 | |
|
65 | |
public Data getData () |
66 | |
{ |
67 | 0 | return data; |
68 | |
} |
69 | |
|
70 | |
|
71 | |
public void setType (String value) |
72 | |
{ |
73 | 0 | data.set (Properties.TYPE.getKey (), value); |
74 | 0 | } |
75 | |
|
76 | |
|
77 | |
public String getType () |
78 | |
{ |
79 | 0 | return (String) data.get (Properties.TYPE.getKey ()); |
80 | |
} |
81 | |
|
82 | |
|
83 | |
public void setName (String value) |
84 | |
{ |
85 | 0 | data.set (Properties.NAME.getKey (), value); |
86 | 0 | } |
87 | |
|
88 | |
|
89 | |
public String getName () |
90 | |
{ |
91 | 0 | return (String) data.get (Properties.NAME.getKey ()); |
92 | |
} |
93 | |
|
94 | |
|
95 | |
public void setAbbr (String value) |
96 | |
{ |
97 | 0 | data.set (Properties.ABBR.getKey (), value); |
98 | 0 | } |
99 | |
|
100 | |
|
101 | |
public String getAbbr () |
102 | |
{ |
103 | 0 | return (String) data.get (Properties.ABBR.getKey ()); |
104 | |
} |
105 | |
|
106 | |
|
107 | |
public void set_runtimeData (RuntimeDataHelper value) |
108 | |
{ |
109 | 0 | data.set (Properties._RUNTIME_DATA.getKey (), (value == null) ? null : value.getData ()); |
110 | 0 | } |
111 | |
|
112 | |
|
113 | |
public RuntimeDataHelper get_runtimeData () |
114 | |
{ |
115 | 0 | return RuntimeDataHelper.wrap ((Data) data.get (Properties._RUNTIME_DATA.getKey ())); |
116 | |
} |
117 | |
|
118 | |
|
119 | |
public void setVersions (Data value) |
120 | |
{ |
121 | 0 | data.set (Properties.VERSIONS.getKey (), value); |
122 | 0 | } |
123 | |
|
124 | |
|
125 | |
public Data getVersions () |
126 | |
{ |
127 | 0 | return (Data) data.get (Properties.VERSIONS.getKey ()); |
128 | |
} |
129 | |
|
130 | |
} |
131 | |
|