1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.principal;
17
18 import java.sql.Date;
19 import java.sql.Timestamp;
20
21 import org.kuali.hr.core.KPMEConstants;
22 import org.kuali.hr.time.HrBusinessObject;
23 import org.kuali.hr.time.holidaycalendar.HolidayCalendar;
24 import org.kuali.hr.time.calendar.Calendar;
25 import org.kuali.rice.kim.api.identity.Person;
26 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
27
28 public class PrincipalHRAttributes extends HrBusinessObject {
29 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "PrincipalHRAttributes";
30
31
32
33 private static final long serialVersionUID = 1L;
34 private String hrPrincipalAttributeId;
35 private String principalId;
36 private String payCalendar;
37 private Date serviceDate;
38 private boolean fmlaEligible;
39 private boolean workmansCompEligible;
40 private String holidayCalendarGroup;
41 private String timezone;
42
43
44
45
46
47 private Calendar calendar;
48 private Person person;
49
50 public HolidayCalendar getHolidayCalendar() {
51 return holidayCalendar;
52 }
53
54 public void setHolidayCalendar(HolidayCalendar holidayCalendar) {
55 this.holidayCalendar = holidayCalendar;
56 }
57
58 private HolidayCalendar holidayCalendar;
59
60 public String getPrincipalId() {
61 return principalId;
62 }
63
64 public void setPrincipalId(String principalId) {
65 this.principalId = principalId;
66 person = KimApiServiceLocator.getPersonService().getPerson(this.principalId);
67 }
68
69 public String getName() {
70 if (person == null) {
71 person = KimApiServiceLocator.getPersonService().getPerson(this.principalId);
72 }
73 return (person != null) ? person.getName() : "";
74 }
75
76 public String getPayCalendar() {
77 return payCalendar;
78 }
79
80 public void setPayCalendar(String payCalendar) {
81 this.payCalendar = payCalendar;
82 }
83
84 public Date getServiceDate() {
85 return serviceDate;
86 }
87
88 public void setServiceDate(Date serviceDate) {
89 this.serviceDate = serviceDate;
90 }
91
92 public boolean isFmlaEligible() {
93 return fmlaEligible;
94 }
95
96 public void setFmlaEligible(boolean fmlaEligible) {
97 this.fmlaEligible = fmlaEligible;
98 }
99
100 public boolean isWorkmansCompEligible() {
101 return workmansCompEligible;
102 }
103
104 public void setWorkmansCompEligible(boolean workmansCompEligible) {
105 this.workmansCompEligible = workmansCompEligible;
106 }
107
108 public Date getEffectiveDate() {
109 return effectiveDate;
110 }
111
112 public void setEffectiveDate(Date effectiveDate) {
113 this.effectiveDate = effectiveDate;
114 }
115
116 public Timestamp getTimestamp() {
117 return timestamp;
118 }
119
120 public void setTimestamp(Timestamp timestamp) {
121 this.timestamp = timestamp;
122 }
123
124 public String getHolidayCalendarGroup() {
125 return holidayCalendarGroup;
126 }
127
128 public void setHolidayCalendarGroup(String holidayCalendarGroup) {
129 this.holidayCalendarGroup = holidayCalendarGroup;
130 }
131
132 public String getTimezone() {
133 return timezone;
134 }
135
136 public void setTimezone(String timezone) {
137 this.timezone = timezone;
138 }
139
140 public Calendar getCalendar() {
141 return calendar;
142 }
143
144 public void setCalendar(Calendar calendar) {
145 this.calendar = calendar;
146 }
147
148 public Person getPerson() {
149 return person;
150 }
151
152 public void setPerson(Person person) {
153 this.person = person;
154 }
155
156 public Boolean getActive() {
157 return active;
158 }
159
160 public void setActive(Boolean active) {
161 this.active = active;
162 }
163
164 @Override
165 protected String getUniqueKey() {
166 return principalId + "_" + payCalendar == null ? "" : payCalendar;
167 }
168
169 @Override
170 public void setId(String id) {
171 }
172
173 @Override
174 public String getId() {
175
176 return null;
177 }
178
179 public String getHrPrincipalAttributeId() {
180 return hrPrincipalAttributeId;
181 }
182
183 public void setHrPrincipalAttributeId(String hrPrincipalAttributeId) {
184 this.hrPrincipalAttributeId = hrPrincipalAttributeId;
185 }
186 }