1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.clocklog;
17
18 import java.sql.Timestamp;
19
20 import org.kuali.hr.job.Job;
21 import org.kuali.hr.time.task.Task;
22 import org.kuali.hr.time.util.TkConstants;
23 import org.kuali.hr.time.workarea.WorkArea;
24 import org.kuali.rice.kim.api.identity.Person;
25 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
26
27 public class ClockLog extends PersistableBusinessObjectBase {
28
29
30
31
32 private static final long serialVersionUID = -2499666820628979901L;
33
34 private String tkClockLogId;
35 private String principalId;
36 private Long jobNumber;
37 private Long workArea;
38 private Long task;
39 private String tkWorkAreaId;
40 private String tkTaskId;
41 private Timestamp clockTimestamp;
42 private String clockTimestampTimezone;
43 private String clockAction;
44 private String ipAddress;
45 private String userPrincipalId;
46 private String hrJobId;
47 private Timestamp timestamp;
48
49 private String missedPunchDocumentId;
50
51 private Job job;
52 private WorkArea workAreaObj;
53 private Task taskObj;
54
55 private Person principal;
56
57 public Job getJob() {
58 return job;
59 }
60
61 public void setJob(Job job) {
62 this.job = job;
63 }
64
65 public String getPrincipalId() {
66 return principalId;
67 }
68
69 public void setPrincipalId(String principalId) {
70 this.principalId = principalId;
71 }
72
73 public Long getJobNumber() {
74 return jobNumber;
75 }
76
77 public void setJobNumber(Long jobNumber) {
78 this.jobNumber = jobNumber;
79 }
80
81 public Timestamp getClockTimestamp() {
82 return clockTimestamp;
83 }
84
85 public void setClockTimestamp(Timestamp clockTimestamp) {
86 this.clockTimestamp = clockTimestamp;
87 }
88
89 public String getClockAction() {
90 return clockAction;
91 }
92
93 public void setClockAction(String clockAction) {
94 this.clockAction = clockAction;
95 }
96
97 public String getIpAddress() {
98 return ipAddress;
99 }
100
101 public void setIpAddress(String ipAddress) {
102 this.ipAddress = ipAddress;
103 }
104
105 public String getUserPrincipalId() {
106 return userPrincipalId;
107 }
108
109 public void setUserPrincipalId(String userPrincipalId) {
110 this.userPrincipalId = userPrincipalId;
111 }
112
113 public Timestamp getTimestamp() {
114 return timestamp;
115 }
116
117 public void setTimestamp(Timestamp timestamp) {
118 this.timestamp = timestamp;
119 }
120
121 public String getClockTimestampTimezone() {
122 return clockTimestampTimezone;
123 }
124
125 public void setClockTimestampTimezone(String clockTimestampTimezone) {
126 this.clockTimestampTimezone = clockTimestampTimezone;
127 }
128
129
130
131
132
133 public String getNextValidClockAction() {
134 String ret;
135
136 if (this.getClockAction().equals(TkConstants.CLOCK_IN)) {
137 ret = TkConstants.CLOCK_OUT;
138 } else if (this.getClockAction().equals(TkConstants.CLOCK_OUT)) {
139 ret = TkConstants.CLOCK_IN;
140 } else if (this.getClockAction().equals(TkConstants.LUNCH_IN)) {
141 ret = TkConstants.LUNCH_OUT;
142 } else if (this.getClockAction().equals(TkConstants.LUNCH_OUT)) {
143 ret = TkConstants.LUNCH_IN;
144 } else {
145 ret = TkConstants.CLOCK_IN;
146 }
147
148 return ret;
149 }
150
151 public String getTkClockLogId() {
152 return tkClockLogId;
153 }
154
155 public void setTkClockLogId(String tkClockLogId) {
156 this.tkClockLogId = tkClockLogId;
157 }
158
159 public String getTkWorkAreaId() {
160 return tkWorkAreaId;
161 }
162
163 public void setTkWorkAreaId(String tkWorkAreaId) {
164 this.tkWorkAreaId = tkWorkAreaId;
165 }
166
167 public String getTkTaskId() {
168 return tkTaskId;
169 }
170
171 public void setTkTaskId(String tkTaskId) {
172 this.tkTaskId = tkTaskId;
173 }
174
175 public String getHrJobId() {
176 return hrJobId;
177 }
178
179 public void setHrJobId(String hrJobId) {
180 this.hrJobId = hrJobId;
181 }
182
183 public WorkArea getWorkAreaObj() {
184 return workAreaObj;
185 }
186
187 public void setWorkAreaObj(WorkArea workAreaObj) {
188 this.workAreaObj = workAreaObj;
189 }
190
191 public Task getTaskObj() {
192 return taskObj;
193 }
194
195 public void setTaskObj(Task taskObj) {
196 this.taskObj = taskObj;
197 }
198
199 public void setWorkArea(Long workArea) {
200 this.workArea = workArea;
201 }
202
203 public void setTask(Long task) {
204 this.task = task;
205 }
206 public Long getWorkArea() {
207 return workArea;
208 }
209 public Long getTask() {
210 return task;
211 }
212
213 public Person getPrincipal() {
214 return principal;
215 }
216
217 public void setPrincipal(Person principal) {
218 this.principal = principal;
219 }
220
221 public String getMissedPunchDocumentId() {
222 return missedPunchDocumentId;
223 }
224
225 public void setMissedPunchDocumentId(String missedPunchDocumentId) {
226 this.missedPunchDocumentId = missedPunchDocumentId;
227 }
228
229 }