1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.department;
17
18 import java.util.ArrayList;
19 import java.util.LinkedList;
20 import java.util.List;
21
22 import org.kuali.hr.core.KPMEConstants;
23 import org.kuali.hr.location.Location;
24 import org.kuali.hr.time.HrBusinessObject;
25 import org.kuali.hr.time.roles.TkRole;
26 import org.kuali.kfs.coa.businessobject.Chart;
27 import org.kuali.kfs.coa.businessobject.Organization;
28
29 public class Department extends HrBusinessObject {
30
31 private static final long serialVersionUID = -7856741688212725536L;
32
33 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "Department";
34
35 private String hrDeptId;
36 private String dept;
37 private String description;
38 private String chart;
39 private String org;
40 private String location;
41
42 private Chart chartObj;
43 private Organization orgObj;
44 private Location locationObj;
45
46 private List<TkRole> roles = new LinkedList<TkRole>();
47 private List<TkRole> inactiveRoles = new ArrayList<TkRole>();
48
49 public String getDescription() {
50 return description;
51 }
52
53 public void setDescription(String description) {
54 this.description = description;
55 }
56
57 public String getChart() {
58 return chart;
59 }
60
61 public void setChart(String chart) {
62 this.chart = chart;
63 }
64
65 public String getOrg() {
66 return org;
67 }
68
69 public void setOrg(String org) {
70 this.org = org;
71 }
72
73 public String getHrDeptId() {
74 return hrDeptId;
75 }
76
77 public void setHrDeptId(String hrDeptId) {
78 this.hrDeptId = hrDeptId;
79 }
80
81 public String getDept() {
82 return dept;
83 }
84
85 public void setDept(String dept) {
86 this.dept = dept;
87 }
88
89 public Chart getChartObj() {
90 return chartObj;
91 }
92
93 public void setChartObj(Chart chartObj) {
94 this.chartObj = chartObj;
95 }
96
97 public Organization getOrgObj() {
98 return orgObj;
99 }
100
101 public void setOrgObj(Organization orgObj) {
102 this.orgObj = orgObj;
103 }
104
105 public List<TkRole> getRoles() {
106 return roles;
107 }
108
109 public void setRoles(List<TkRole> roles) {
110 this.roles = roles;
111 }
112
113 public List<TkRole> getInactiveRoles() {
114 return inactiveRoles;
115 }
116
117
118 public void setInactiveRoles(List<TkRole> inactiveRoles) {
119 this.inactiveRoles = inactiveRoles;
120 }
121
122
123 @Override
124 public String getUniqueKey() {
125 return getDept() + "_" + getOrg() + "_" + getChart() + getRoles().size();
126 }
127
128 @Override
129 public String getId() {
130 return getHrDeptId();
131 }
132
133 @Override
134 public void setId(String id) {
135 setHrDeptId(id);
136 }
137
138 public String getLocation() {
139 return location;
140 }
141
142 public void setLocation(String location) {
143 this.location = location;
144 }
145
146 public Location getLocationObj() {
147 return locationObj;
148 }
149
150 public void setLocationObj(Location locationObj) {
151 this.locationObj = locationObj;
152 }
153 }