1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.leaveplan;
17
18 import java.util.Date;
19 import java.sql.Time;
20
21 import org.apache.commons.lang3.StringUtils;
22 import org.joda.time.DateTime;
23 import org.joda.time.LocalDate;
24 import org.joda.time.LocalTime;
25 import org.kuali.hr.core.KPMEConstants;
26 import org.kuali.hr.time.HrBusinessObject;
27
28 public class LeavePlan extends HrBusinessObject {
29
30 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE
31 + "/" + "LeavePlan";
32
33 private static final long serialVersionUID = 1L;
34 private String lmLeavePlanId;
35 private String leavePlan;
36 private String descr;
37 private String calendarYearStart;
38 private Boolean history;
39 private String planningMonths;
40 private String batchPriorYearCarryOverStartDate;
41 private Time batchPriorYearCarryOverStartTime;
42
43 public String getBatchPriorYearCarryOverStartDate() {
44 return batchPriorYearCarryOverStartDate;
45 }
46
47 public void setBatchPriorYearCarryOverStartDate(
48 String batchPriorYearCarryOverStartDate) {
49 this.batchPriorYearCarryOverStartDate = batchPriorYearCarryOverStartDate;
50 }
51
52 public Time getBatchPriorYearCarryOverStartTime() {
53 return batchPriorYearCarryOverStartTime;
54 }
55
56 public void setBatchPriorYearCarryOverStartTime(
57 Time batchPriorYearCarryOverStartTime) {
58 this.batchPriorYearCarryOverStartTime = batchPriorYearCarryOverStartTime;
59 }
60
61 public String getPlanningMonths() {
62 return planningMonths;
63 }
64
65 public void setPlanningMonths(String planningMonths) {
66 this.planningMonths = planningMonths;
67 }
68
69 public String getLmLeavePlanId() {
70 return lmLeavePlanId;
71 }
72
73 public void setLmLeavePlanId(String lmLeavePlanId) {
74 this.lmLeavePlanId = lmLeavePlanId;
75 }
76
77 public String getLeavePlan() {
78 return leavePlan;
79 }
80
81 public void setLeavePlan(String leavePlan) {
82 this.leavePlan = leavePlan;
83 }
84
85 public String getDescr() {
86 return descr;
87 }
88
89 public void setDescr(String descr) {
90 this.descr = descr;
91 }
92
93 public String getCalendarYearStart() {
94 return calendarYearStart;
95 }
96
97 public void setCalendarYearStart(String calendarYearStart) {
98 this.calendarYearStart = calendarYearStart;
99 }
100
101 public String getCalendarYearStartMonth() {
102 if (StringUtils.isEmpty(getCalendarYearStart())) {
103 return "01";
104 }
105 String[] date = getCalendarYearStart().split("/");
106 return date[0];
107 }
108
109 public String getCalendarYearStartDayOfMonth() {
110 if (StringUtils.isEmpty(getCalendarYearStart())) {
111 return "01";
112 }
113 String[] date = getCalendarYearStart().split("/");
114 return date[1];
115 }
116
117
118 public Boolean getHistory() {
119 return history;
120 }
121
122 public void setHistory(Boolean history) {
123 this.history = history;
124 }
125
126 @Override
127 protected String getUniqueKey() {
128 return leavePlan;
129 }
130
131 @Override
132 public String getId() {
133 return getLmLeavePlanId();
134 }
135
136 @Override
137 public void setId(String id) {
138 setLmLeavePlanId(id);
139 }
140
141 }