1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.core.organization.assembly.data.server.org; |
17 | |
|
18 | |
import java.util.Date; |
19 | |
|
20 | |
import org.kuali.student.common.assembly.data.Data; |
21 | |
import org.kuali.student.common.assembly.helper.PropertyEnum; |
22 | |
|
23 | |
public class OrgPersonHelper { |
24 | |
private static final long serialVersionUID = 1L; |
25 | |
|
26 | 0 | public enum Properties implements PropertyEnum { |
27 | 0 | ID("id"),PERSON_ID("personId"),PERSON_RELATION_TYPE("type"),ORG_ID("orgId"),PERSON_NAME("personName"), |
28 | 0 | EFFECTIVE_DATE("effectiveDate"), EXPIRATION_DATE("expirationDate"), STATE("state"); |
29 | |
|
30 | |
private final String key; |
31 | |
|
32 | 0 | private Properties(final String key) { |
33 | 0 | this.key = key; |
34 | 0 | } |
35 | |
|
36 | |
@Override |
37 | |
public String getKey() { |
38 | 0 | return this.key; |
39 | |
} |
40 | |
} |
41 | |
|
42 | |
private Data data; |
43 | |
|
44 | 0 | private OrgPersonHelper(Data data){ |
45 | 0 | this.data=data; |
46 | 0 | } |
47 | |
|
48 | |
public static OrgPersonHelper wrap (Data data) |
49 | |
{ |
50 | 0 | if (data == null) |
51 | |
{ |
52 | 0 | return null; |
53 | |
} |
54 | 0 | return new OrgPersonHelper(data); |
55 | |
} |
56 | |
|
57 | |
public Data getData(){ |
58 | 0 | return data; |
59 | |
} |
60 | |
|
61 | |
public void setId(String id){ |
62 | 0 | data.set(Properties.ID.getKey(), id); |
63 | 0 | } |
64 | |
|
65 | |
public String getId() { |
66 | 0 | return data.get(Properties.ID.getKey()); |
67 | |
} |
68 | |
|
69 | |
public Date getEffectiveDate() { |
70 | 0 | return data.get(Properties.EFFECTIVE_DATE.getKey()); |
71 | |
} |
72 | |
|
73 | |
public void setEffectiveDate(Date value) { |
74 | 0 | data.set(Properties.EFFECTIVE_DATE.getKey(), value); |
75 | 0 | } |
76 | |
|
77 | |
public Date getExpirationDate() { |
78 | 0 | return data.get(Properties.EXPIRATION_DATE.getKey()); |
79 | |
} |
80 | |
|
81 | |
public void setExpirationDate(Date value) { |
82 | 0 | data.set(Properties.EXPIRATION_DATE.getKey(), value); |
83 | 0 | } |
84 | |
|
85 | |
public void setTypeKey(String type) { |
86 | 0 | data.set(Properties.PERSON_RELATION_TYPE.getKey(), type); |
87 | 0 | } |
88 | |
|
89 | |
public String getTypeKey() { |
90 | 0 | return data.get(Properties.PERSON_RELATION_TYPE.getKey()); |
91 | |
} |
92 | |
|
93 | |
public void setPersonId(String personId){ |
94 | 0 | data.set(Properties.PERSON_ID.getKey(), personId); |
95 | 0 | } |
96 | |
|
97 | |
public String getPersonId() { |
98 | 0 | return data.get(Properties.PERSON_ID.getKey()); |
99 | |
} |
100 | |
|
101 | |
public void setOrgId(String orgId){ |
102 | 0 | data.set(Properties.ORG_ID.getKey(), orgId); |
103 | 0 | } |
104 | |
|
105 | |
public String getOrgId() { |
106 | 0 | return data.get(Properties.ORG_ID.getKey()); |
107 | |
} |
108 | |
|
109 | |
public String getPersonName(){ |
110 | 0 | return data.get(Properties.PERSON_NAME.getKey()); |
111 | |
} |
112 | |
|
113 | |
public void setPersonName(String personName){ |
114 | 0 | data.set(Properties.PERSON_NAME.getKey(), personName); |
115 | 0 | } |
116 | |
public void setState(String state){ |
117 | 0 | data.set(Properties.STATE.getKey(), state); |
118 | 0 | } |
119 | |
|
120 | |
public String getState() { |
121 | 0 | return data.get(Properties.STATE.getKey()); |
122 | |
} |
123 | |
} |