1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.missedpunch;
17
18 import java.sql.Time;
19 import java.sql.Timestamp;
20
21 import org.kuali.hr.time.service.base.TkServiceLocator;
22 import org.kuali.rice.krad.document.TransactionalDocumentBase;
23 import org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent;
24
25 public class MissedPunchDocument extends TransactionalDocumentBase {
26
27
28
29
30 private static final long serialVersionUID = 1L;
31
32 private String principalId;
33 private String clockAction;
34 private java.util.Date actionDate;
35 private Time actionTime;
36 private String timesheetDocumentId;
37 private String documentStatus;
38 private String tkClockLogId;
39 private Timestamp timestamp;
40 private String ipAddress;
41
42
43 private String assignment;
44
45 public String getPrincipalId() {
46 return principalId;
47 }
48 public void setPrincipalId(String principalId) {
49 this.principalId = principalId;
50 }
51 public String getClockAction() {
52 return clockAction;
53 }
54 public void setClockAction(String clockAction) {
55 this.clockAction = clockAction;
56 }
57 public java.util.Date getActionDate() {
58 return actionDate;
59 }
60 public void setActionDate(java.util.Date actionDate) {
61 this.actionDate = actionDate;
62 }
63 public Time getActionTime() {
64 return actionTime;
65 }
66 public void setActionTime(Time actionTime) {
67 this.actionTime = actionTime;
68 }
69 public String getTimesheetDocumentId() {
70 return timesheetDocumentId;
71 }
72 public void setTimesheetDocumentId(String timesheetDocumentId) {
73 this.timesheetDocumentId = timesheetDocumentId;
74 }
75 public String getDocumentStatus() {
76 return documentStatus;
77 }
78 public void setDocumentStatus(String documentStatus) {
79 this.documentStatus = documentStatus;
80 }
81 public String getTkClockLogId() {
82 return tkClockLogId;
83 }
84 public void setTkClockLogId(String tkClockLogId) {
85 this.tkClockLogId = tkClockLogId;
86 }
87 public Timestamp getTimestamp() {
88 return timestamp;
89 }
90 public void setTimestamp(Timestamp timestamp) {
91 this.timestamp = timestamp;
92 }
93 public String getIpAddress() {
94 return ipAddress;
95 }
96 public void setIpAddress(String ipAddress) {
97 this.ipAddress = ipAddress;
98 }
99 public String getAssignment() {
100 return assignment;
101 }
102 public void setAssignment(String assignment) {
103 this.assignment = assignment;
104 }
105
106 @Override
107 public void prepareForSave(KualiDocumentEvent event) {
108 if(this.getTkClockLogId() == null) {
109 TkServiceLocator.getMissedPunchService().addClockLogForMissedPunch(this);
110 }
111 }
112
113 }