1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.module.cg.businessobject;
18
19 import java.util.LinkedHashMap;
20
21 import org.kuali.ole.sys.OLEConstants;
22 import org.kuali.ole.sys.context.SpringContext;
23 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
24 import org.kuali.rice.kim.api.identity.Person;
25 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
26
27
28
29
30
31 public class AwardProjectDirector extends PersistableBusinessObjectBase implements Primaryable, CGProjectDirector, MutableInactivatable {
32
33 private String principalId;
34 private Long proposalNumber;
35 private boolean awardPrimaryProjectDirectorIndicator;
36 private String awardProjectDirectorProjectTitle;
37 private boolean active = true;
38
39 private Person projectDirector;
40
41 private final String userLookupRoleNamespaceCode = OLEConstants.ParameterNamespaces.OLE;
42 private final String userLookupRoleName = OLEConstants.SysKimApiConstants.CONTRACTS_AND_GRANTS_PROJECT_DIRECTOR;
43
44
45
46
47 public AwardProjectDirector() {
48 }
49
50
51
52
53 @Override
54 public String getPrincipalId() {
55 return principalId;
56 }
57
58
59
60
61 @Override
62 public void setPrincipalId(String principalId) {
63 this.principalId = principalId;
64 }
65
66
67
68
69
70 @Override
71 public Long getProposalNumber() {
72 return proposalNumber;
73 }
74
75
76
77
78 @Override
79 public void setProposalNumber(Long proposalNumber) {
80 this.proposalNumber = proposalNumber;
81 }
82
83
84
85
86
87
88
89 public boolean isAwardPrimaryProjectDirectorIndicator() {
90 return awardPrimaryProjectDirectorIndicator;
91 }
92
93
94
95
96
97
98
99 public void setAwardPrimaryProjectDirectorIndicator(boolean awardPrimaryProjectDirectorIndicator) {
100 this.awardPrimaryProjectDirectorIndicator = awardPrimaryProjectDirectorIndicator;
101 }
102
103
104
105
106
107
108
109 public String getAwardProjectDirectorProjectTitle() {
110 return awardProjectDirectorProjectTitle;
111 }
112
113
114
115
116
117
118 public void setAwardProjectDirectorProjectTitle(String awardProjectDirectorProjectTitle) {
119 this.awardProjectDirectorProjectTitle = awardProjectDirectorProjectTitle;
120 }
121
122
123
124
125 @Override
126 public Person getProjectDirector() {
127 projectDirector = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(principalId, projectDirector);
128 return projectDirector;
129 }
130
131
132
133
134 @Override
135 public void setProjectDirector(Person projectDirector) {
136 this.projectDirector = projectDirector;
137 }
138
139
140
141
142 @Override
143 public boolean isPrimary() {
144 return isAwardPrimaryProjectDirectorIndicator();
145 }
146
147
148
149
150 @Override
151 public boolean isActive() {
152 return active;
153 }
154
155
156
157
158 @Override
159 public void setActive(boolean active) {
160 this.active = active;
161 }
162
163 public String getUserLookupRoleNamespaceCode() {
164 return userLookupRoleNamespaceCode;
165 }
166
167 public void setUserLookupRoleNamespaceCode(String userLookupRoleNamespaceCode) {
168 }
169
170 public String getUserLookupRoleName() {
171 return userLookupRoleName;
172 }
173
174 public void setUserLookupRoleName(String userLookupRoleName) {
175 }
176
177
178
179
180 @SuppressWarnings("unchecked")
181
182 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
183 LinkedHashMap m = new LinkedHashMap();
184 m.put("principalId", this.principalId);
185 if (this.proposalNumber != null) {
186 m.put("proposalNumber", this.proposalNumber.toString());
187 }
188 return m;
189 }
190
191 }
192