1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.workarea;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.hr.core.KPMEConstants;
22 import org.kuali.hr.time.HrBusinessObject;
23 import org.kuali.hr.time.authorization.DepartmentalRule;
24 import org.kuali.hr.time.department.Department;
25 import org.kuali.hr.time.earncode.EarnCode;
26 import org.kuali.hr.time.roles.TkRole;
27 import org.kuali.hr.time.task.Task;
28
29 public class WorkArea extends HrBusinessObject implements DepartmentalRule {
30
31 private static final long serialVersionUID = 307144025705246544L;
32
33 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "WorkArea";
34
35 private String tkWorkAreaId;
36 private Long workArea;
37 private String description;
38 private String dept;
39 private String adminDescr;
40 private String userPrincipalId;
41 private String defaultOvertimeEarnCode;
42 private String overtimeEditRole;
43 private Boolean ovtEarnCode;
44
45 private boolean history;
46
47 private List<TkRole> roles = new ArrayList<TkRole>();
48 private List<TkRole> inactiveRoles = new ArrayList<TkRole>();
49 private List<Task> tasks = new ArrayList<Task>();
50
51 private Department department;
52 private EarnCode defaultOvertimeEarnCodeObj;
53
54 public String getAdminDescr() {
55 return adminDescr;
56 }
57
58 public void setAdminDescr(String adminDescr) {
59 this.adminDescr = adminDescr;
60 }
61
62 public String getUserPrincipalId() {
63 return userPrincipalId;
64 }
65
66 public void setUserPrincipalId(String userPrincipalId) {
67 this.userPrincipalId = userPrincipalId;
68 }
69
70 public String getDescription() {
71 return description;
72 }
73
74 public void setDescription(String description) {
75 this.description = description;
76 }
77
78 public List<Task> getTasks() {
79 return tasks;
80 }
81
82 public void setTasks(List<Task> tasks) {
83 this.tasks = tasks;
84 }
85
86 public String getTkWorkAreaId() {
87 return tkWorkAreaId;
88 }
89
90 public void setTkWorkAreaId(String tkWorkAreaId) {
91 this.tkWorkAreaId = tkWorkAreaId;
92 }
93
94 public Long getWorkArea() {
95 return workArea;
96 }
97
98 public void setWorkArea(Long workArea) {
99 this.workArea = workArea;
100 }
101
102 public String getDept() {
103 return dept;
104 }
105
106 public void setDept(String dept) {
107 this.dept = dept;
108 }
109
110 public List<TkRole> getInactiveRoles() {
111 return inactiveRoles;
112 }
113
114 public void setInactiveRoles(List<TkRole> inactiveRoles) {
115 this.inactiveRoles = inactiveRoles;
116 }
117
118 public List<TkRole> getRoles() {
119 return roles;
120 }
121
122 public void setRoles(List<TkRole> roles) {
123 this.roles = roles;
124 }
125
126 public Department getDepartment() {
127 return department;
128 }
129
130 public void setDepartment(Department department) {
131 this.department = department;
132 }
133
134 public String getDefaultOvertimeEarnCode() {
135 return defaultOvertimeEarnCode;
136 }
137
138 public void setDefaultOvertimeEarnCode(String defaultOvertimeEarnCode) {
139 this.defaultOvertimeEarnCode = defaultOvertimeEarnCode;
140 }
141
142 public EarnCode getDefaultOvertimeEarnCodeObj() {
143 return defaultOvertimeEarnCodeObj;
144 }
145
146 public void setDefaultOvertimeEarnCodeObj(EarnCode defaultOvertimeEarnCodeObj) {
147 this.defaultOvertimeEarnCodeObj = defaultOvertimeEarnCodeObj;
148 }
149
150 public String getOvertimeEditRole() {
151 return overtimeEditRole;
152 }
153
154 public void setOvertimeEditRole(String overtimeEditRole) {
155 this.overtimeEditRole = overtimeEditRole;
156 }
157
158 public Boolean getOvtEarnCode() {
159 return ovtEarnCode;
160 }
161
162 public void setOvtEarnCode(Boolean ovtEarnCode) {
163 this.ovtEarnCode = ovtEarnCode;
164 }
165
166 @Override
167 public String getUniqueKey() {
168 return workArea != null ? workArea.toString() : "" +"_"+dept;
169 }
170
171 @Override
172 public String getId() {
173 return getTkWorkAreaId();
174 }
175
176 @Override
177 public void setId(String id) {
178 setTkWorkAreaId(id);
179 }
180
181 public boolean isHistory() {
182 return history;
183 }
184
185 public void setHistory(boolean history) {
186 this.history = history;
187 }
188
189 }