View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.time.department;
17  
18  import java.sql.Date;
19  import java.sql.Timestamp;
20  import java.util.ArrayList;
21  import java.util.LinkedList;
22  import java.util.List;
23  
24  import org.kuali.hr.core.KPMEConstants;
25  import org.kuali.hr.location.Location;
26  import org.kuali.hr.time.HrBusinessObject;
27  import org.kuali.hr.time.roles.TkRole;
28  import org.kuali.kfs.coa.businessobject.Chart;
29  import org.kuali.kfs.coa.businessobject.Organization;
30  
31  public class Department extends HrBusinessObject {
32      public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "Department";
33      private static final long serialVersionUID = 1L;
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 Date getEffectiveDate() {
90  		return effectiveDate;
91  	}
92  
93  	public void setEffectiveDate(Date effectiveDate) {
94  		this.effectiveDate = effectiveDate;
95  	}
96  
97  	public Timestamp getTimestamp() {
98  		return timestamp;
99  	}
100 
101 	public void setTimestamp(Timestamp timestamp) {
102 		this.timestamp = timestamp;
103 	}
104 
105 	public Boolean getActive() {
106 		return active;
107 	}
108 
109 	public void setActive(Boolean active) {
110 		this.active = active;
111 	}
112 
113 	public Chart getChartObj() {
114 		return chartObj;
115 	}
116 
117 	public void setChartObj(Chart chartObj) {
118 		this.chartObj = chartObj;
119 	}
120 
121 	public Organization getOrgObj() {
122 		return orgObj;
123 	}
124 
125 	public void setOrgObj(Organization orgObj) {
126 		this.orgObj = orgObj;
127 	}
128 
129 	public List<TkRole> getRoles() {
130 		return roles;
131 	}
132 
133 	public void setRoles(List<TkRole> roles) {
134 		this.roles = roles;
135 	}
136 	
137 	public List<TkRole> getInactiveRoles() {
138 		return inactiveRoles;
139 	}
140 
141 
142 	public void setInactiveRoles(List<TkRole> inactiveRoles) {
143 		this.inactiveRoles = inactiveRoles;
144 	}
145 
146 
147 	@Override
148 	public String getUniqueKey() {
149 		return getDept() + "_" + getOrg() + "_" + getChart() + getRoles().size();
150 	}
151 
152 	@Override
153 	public String getId() {
154 		return getHrDeptId();
155 	}
156 
157 	@Override
158 	public void setId(String id) {
159 		setHrDeptId(id);
160 	}
161 
162 	public String getLocation() {
163 		return location;
164 	}
165 
166 	public void setLocation(String location) {
167 		this.location = location;
168 	}
169 
170 	public Location getLocationObj() {
171 		return locationObj;
172 	}
173 
174 	public void setLocationObj(Location locationObj) {
175 		this.locationObj = locationObj;
176 	}
177 }