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 private String history;
42
43 private Chart chartObj;
44 private Organization orgObj;
45 private Location locationObj;
46
47 private List<TkRole> roles = new LinkedList<TkRole>();
48 private List<TkRole> inactiveRoles = new ArrayList<TkRole>();
49
50 public String getDescription() {
51 return description;
52 }
53
54 public void setDescription(String description) {
55 this.description = description;
56 }
57
58 public String getChart() {
59 return chart;
60 }
61
62 public void setChart(String chart) {
63 this.chart = chart;
64 }
65
66 public String getOrg() {
67 return org;
68 }
69
70 public void setOrg(String org) {
71 this.org = org;
72 }
73
74 public String getHrDeptId() {
75 return hrDeptId;
76 }
77
78 public void setHrDeptId(String hrDeptId) {
79 this.hrDeptId = hrDeptId;
80 }
81
82 public String getDept() {
83 return dept;
84 }
85
86 public void setDept(String dept) {
87 this.dept = dept;
88 }
89
90 public Chart getChartObj() {
91 return chartObj;
92 }
93
94 public void setChartObj(Chart chartObj) {
95 this.chartObj = chartObj;
96 }
97
98 public Organization getOrgObj() {
99 return orgObj;
100 }
101
102 public void setOrgObj(Organization orgObj) {
103 this.orgObj = orgObj;
104 }
105
106 public List<TkRole> getRoles() {
107 return roles;
108 }
109
110 public void setRoles(List<TkRole> roles) {
111 this.roles = roles;
112 }
113
114 public List<TkRole> getInactiveRoles() {
115 return inactiveRoles;
116 }
117
118
119 public void setInactiveRoles(List<TkRole> inactiveRoles) {
120 this.inactiveRoles = inactiveRoles;
121 }
122
123
124 @Override
125 public String getUniqueKey() {
126 return getDept() + "_" + getOrg() + "_" + getChart() + getRoles().size();
127 }
128
129 @Override
130 public String getId() {
131 return getHrDeptId();
132 }
133
134 @Override
135 public void setId(String id) {
136 setHrDeptId(id);
137 }
138
139 public String getLocation() {
140 return location;
141 }
142
143 public void setLocation(String location) {
144 this.location = location;
145 }
146
147 public Location getLocationObj() {
148 return locationObj;
149 }
150
151 public void setLocationObj(Location locationObj) {
152 this.locationObj = locationObj;
153 }
154
155 public String getHistory() {
156 return history;
157 }
158
159 public void setHistory(String history) {
160 this.history = history;
161 }
162 }