1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.time.workflow;
17
18 import java.util.Date;
19
20 import org.joda.time.DateTime;
21 import org.kuali.kpme.core.document.calendar.CalendarDocumentHeader;
22 import org.kuali.kpme.core.util.HrConstants;
23 import org.kuali.kpme.tklm.api.time.workflow.TimesheetDocumentHeaderContract;
24
25 public class TimesheetDocumentHeader extends CalendarDocumentHeader implements TimesheetDocumentHeaderContract {
26
27 private static final long serialVersionUID = 1L;
28
29 public TimesheetDocumentHeader() {
30 this.calendarType = HrConstants.PAY_CALENDAR_TYPE;
31 }
32
33 public TimesheetDocumentHeader(String documentId, String principalId, Date payBeginDate, Date payEndDate, String documentStatus) {
34 this.documentId = documentId;
35 this.principalId = principalId;
36 this.beginDate = payBeginDate;
37 this.endDate = payEndDate;
38 this.documentStatus = documentStatus;
39 this.calendarType = HrConstants.PAY_CALENDAR_TYPE;
40 }
41
42 @Override
43 public String getDocumentId() {
44 return documentId;
45 }
46
47 public void setDocumentId(String documentId) {
48 this.documentId = documentId;
49 }
50
51 @Override
52 public String getPrincipalId() {
53 return principalId;
54 }
55
56 public void setPrincipalId(String principalId) {
57 this.principalId = principalId;
58 }
59
60 @Override
61 public Date getEndDate() {
62 return endDate;
63 }
64
65 public void setEndDate(Date endDate) {
66 this.endDate = endDate;
67 }
68
69 @Override
70 public DateTime getEndDateTime() {
71 return endDate != null ? new DateTime(endDate) : null;
72 }
73
74 public void setEndDateTime(DateTime endDateTime) {
75 this.endDate = endDateTime != null ? endDateTime.toDate() : null;
76 }
77
78 @Override
79 public String getDocumentStatus() {
80 return documentStatus;
81 }
82
83 public void setDocumentStatus(String documentStatus) {
84 this.documentStatus = documentStatus;
85 }
86
87 @Override
88 public Date getBeginDate() {
89 return beginDate;
90 }
91
92 public void setBeginDate(Date beginDate) {
93 this.beginDate = beginDate;
94 }
95
96 @Override
97 public DateTime getBeginDateTime() {
98 return beginDate != null ? new DateTime(beginDate) : null;
99 }
100
101 public void setBeginDateTime(DateTime beginDateTime) {
102 this.beginDate = beginDateTime != null ? beginDateTime.toDate() : null;
103 }
104
105 @Override
106 public String getCalendarType() {
107 return calendarType;
108 }
109
110 }