1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.bo.ui;
17
18 import java.util.LinkedHashMap;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.FetchType;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.ManyToOne;
26 import javax.persistence.Table;
27
28 import org.hibernate.annotations.Type;
29 import org.kuali.rice.kim.bo.reference.EmploymentStatus;
30 import org.kuali.rice.kim.bo.reference.EmploymentType;
31 import org.kuali.rice.kim.bo.reference.impl.EmploymentStatusImpl;
32 import org.kuali.rice.kim.bo.reference.impl.EmploymentTypeImpl;
33 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
34 import org.kuali.rice.kns.util.KualiDecimal;
35
36
37
38
39
40
41
42 @Entity
43 @Table(name = "KRIM_PND_EMP_INFO_MT")
44 public class PersonDocumentEmploymentInfo extends KimDocumentBoBase {
45 @Id
46 @Column(name = "ENTITY_EMP_ID")
47 protected String entityEmploymentId;
48
49 @Column(name = "ENTITY_AFLTN_ID")
50 protected String entityAffiliationId;
51
52 @Column(name = "EMP_STAT_CD")
53 protected String employeeStatusCode;
54
55 @Column(name = "EMP_TYP_CD")
56 protected String employeeTypeCode;
57
58 @Column(name = "PRMRY_DEPT_CD")
59 protected String primaryDepartmentCode;
60
61 @Column(name = "BASE_SLRY_AMT")
62 protected KualiDecimal baseSalaryAmount;
63 @Column(name = "EMP_ID")
64 protected String employeeId;
65
66 @Column(name = "EMP_REC_ID")
67 protected String employmentRecordId;
68
69 @Type(type="yes_no")
70 @Column(name="PRMRY_IND")
71 protected boolean primary;
72
73 @ManyToOne(targetEntity=EmploymentTypeImpl.class, fetch = FetchType.EAGER, cascade = {})
74 @JoinColumn(name = "EMP_TYP_CD", insertable = false, updatable = false)
75 protected EmploymentType employmentType;
76
77 @ManyToOne(targetEntity=EmploymentStatusImpl.class, fetch = FetchType.EAGER, cascade = {})
78 @JoinColumn(name = "EMP_STAT_CD", insertable = false, updatable = false)
79 protected EmploymentStatus employmentStatus;
80
81 protected PersonDocumentAffiliation affiliation;
82
83 public PersonDocumentEmploymentInfo() {
84 this.active = true;
85 }
86
87
88
89
90 public KualiDecimal getBaseSalaryAmount() {
91 return baseSalaryAmount;
92 }
93
94
95
96
97 public String getEmployeeStatusCode() {
98 return employeeStatusCode;
99 }
100
101
102
103
104 public String getEmployeeTypeCode() {
105 return employeeTypeCode;
106 }
107
108
109
110
111 public String getEntityAffiliationId() {
112 return entityAffiliationId;
113 }
114
115
116
117
118 public String getEntityEmploymentId() {
119 return entityEmploymentId;
120 }
121
122
123
124
125 public boolean isPrimary() {
126 return primary;
127 }
128
129
130
131
132 public void setEntityAffiliationId(String entityAffiliationId) {
133 this.entityAffiliationId = entityAffiliationId;
134 }
135
136
137
138
139 public void setBaseSalaryAmount(KualiDecimal baseSalaryAmount) {
140 this.baseSalaryAmount = baseSalaryAmount;
141 }
142
143
144
145
146 public void setEmployeeStatusCode(String employeeStatusCode) {
147 this.employeeStatusCode = employeeStatusCode;
148 }
149
150
151
152
153 public void setEmployeeTypeCode(String employeeTypeCode) {
154 this.employeeTypeCode = employeeTypeCode;
155 }
156
157
158
159
160 public void setPrimary(boolean primary) {
161 this.primary = primary;
162 }
163
164
165
166
167 @Override
168 protected LinkedHashMap toStringMapper() {
169 LinkedHashMap m = super.toStringMapper();
170 m.put( "entityEmploymentId", entityEmploymentId );
171 m.put( "entityAffiliationId", entityAffiliationId );
172 m.put( "employeeStatusCode", employeeStatusCode );
173 m.put( "employeeTypeCode", employeeTypeCode );
174 m.put( "baseSalaryAmount", baseSalaryAmount );
175 m.put( "primary", primary );
176 return m;
177 }
178
179 public void setEntityEmploymentId(String entityEmploymentId) {
180 this.entityEmploymentId = entityEmploymentId;
181 }
182
183 public EmploymentType getEmploymentType() {
184 return this.employmentType;
185 }
186
187 public void setEmploymentType(EmploymentType employmentType) {
188 this.employmentType = employmentType;
189 }
190
191 public EmploymentStatus getEmploymentStatus() {
192 return this.employmentStatus;
193 }
194
195 public void setEmploymentStatus(EmploymentStatus employmentStatus) {
196 this.employmentStatus = employmentStatus;
197 }
198
199 public String getPrimaryDepartmentCode() {
200 return this.primaryDepartmentCode;
201 }
202
203 public void setPrimaryDepartmentCode(String primaryDepartmentCode) {
204 this.primaryDepartmentCode = primaryDepartmentCode;
205 }
206
207 public PersonDocumentAffiliation getAffiliation() {
208 return this.affiliation;
209 }
210
211 public void setAffiliation(PersonDocumentAffiliation affiliation) {
212 this.affiliation = affiliation;
213 }
214
215 public String getEmployeeId() {
216 return this.employeeId;
217 }
218
219 public void setEmployeeId(String employeeId) {
220 this.employeeId = employeeId;
221 }
222
223 public String getEmploymentRecordId() {
224 return this.employmentRecordId;
225 }
226
227 public void setEmploymentRecordId(String employmentRecordId) {
228 this.employmentRecordId = employmentRecordId;
229 }
230
231 @Override
232 public boolean isActive(){
233 return this.active;
234 }
235
236 }