Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
OrgProposalHelper |
|
| 1.4285714285714286;1.429 | ||||
OrgProposalHelper$Properties |
|
| 1.4285714285714286;1.429 |
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.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 OrgProposalHelper | |
24 | { | |
25 | private static final long serialVersionUID = 1; | |
26 | ||
27 | 0 | public enum Properties implements PropertyEnum |
28 | { | |
29 | 0 | ORG ("org"); |
30 | ||
31 | private final String key; | |
32 | ||
33 | private Properties (final String key) | |
34 | 0 | { |
35 | 0 | this.key = key; |
36 | 0 | } |
37 | ||
38 | @Override | |
39 | public String getKey () | |
40 | { | |
41 | 0 | return this.key; |
42 | } | |
43 | } | |
44 | private Data data; | |
45 | ||
46 | private OrgProposalHelper (Data data) | |
47 | 0 | { |
48 | 0 | this.data = data; |
49 | 0 | } |
50 | ||
51 | public static OrgProposalHelper wrap (Data data) | |
52 | { | |
53 | 0 | if (data == null) |
54 | { | |
55 | 0 | return null; |
56 | } | |
57 | 0 | return new OrgProposalHelper (data); |
58 | } | |
59 | ||
60 | public Data getData () | |
61 | { | |
62 | 0 | return data; |
63 | } | |
64 | ||
65 | ||
66 | public void setOrg (OrgHelper value) | |
67 | { | |
68 | 0 | data.set (Properties.ORG.getKey (), (value == null) ? null : value.getData ()); |
69 | 0 | } |
70 | ||
71 | ||
72 | public OrgHelper getOrg () | |
73 | { | |
74 | 0 | return OrgHelper.wrap ((Data) data.get (Properties.ORG.getKey ())); |
75 | } | |
76 | ||
77 | } | |
78 |