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.lm.earncodesec;
17  
18  import java.util.Arrays;
19  import java.util.Collections;
20  import java.util.List;
21  
22  import org.kuali.hr.core.KPMEConstants;
23  import org.kuali.hr.job.Job;
24  import org.kuali.hr.location.Location;
25  import org.kuali.hr.time.HrBusinessObject;
26  import org.kuali.hr.time.department.Department;
27  import org.kuali.hr.time.earncode.EarnCode;
28  import org.kuali.hr.time.salgroup.SalGroup;
29  
30  public class EarnCodeSecurity extends HrBusinessObject {
31  
32  	private static final long serialVersionUID = -4884673156883588639L;
33  	
34  	public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "EarnCodeSecurity";
35      private static final String[] PRIVATE_CACHES_FOR_FLUSH = {EarnCodeSecurity.CACHE_NAME, EarnCode.CACHE_NAME};
36      public static final List<String> CACHE_FLUSH = Collections.unmodifiableList(Arrays.asList(PRIVATE_CACHES_FOR_FLUSH));
37  
38  	private String hrEarnCodeSecurityId;
39  	private String dept;
40  	private String hrSalGroup;
41  	private String earnCode;
42  	private boolean employee;
43  	private boolean approver;
44  	private String location;
45  	private String earnCodeType;
46  	
47  	private String hrDeptId;
48  	private String hrSalGroupId;
49  	private String hrEarnCodeId;
50  	private String hrLocationId;
51  	
52  	private SalGroup  salGroupObj;
53  	private Department departmentObj;
54  	private EarnCode earnCodeObj;
55      private Job jobObj;
56      private Location locationObj;
57      private String history;
58  
59  	public String getHrEarnCodeSecurityId() {
60  		return hrEarnCodeSecurityId;
61  	}
62  
63  	public void setHrEarnCodeSecurityId(String hrEarnCodeSecurityId) {
64  		this.hrEarnCodeSecurityId = hrEarnCodeSecurityId;
65  	}
66  
67  	public String getEarnCodeType() {
68  		return earnCodeType;
69  	}
70  
71  	public void setEarnCodeType(String earnCodeType) {
72  		this.earnCodeType = earnCodeType;
73  	}
74  
75  	public SalGroup getSalGroupObj() {
76  		return salGroupObj;
77  	}
78  
79  	public void setSalGroupObj(SalGroup salGroupObj) {
80  		this.salGroupObj = salGroupObj;
81  	}
82  
83  	public Department getDepartmentObj() {
84  		return departmentObj;
85  	}
86  
87  	public void setDepartmentObj(Department departmentObj) {
88  		this.departmentObj = departmentObj;
89  	}
90  	
91  	public boolean isEmployee() {
92  		return employee;
93  	}
94  
95  	public void setEmployee(boolean employee) {
96  		this.employee = employee;
97  	}
98  
99  	public boolean isApprover() {
100 		return approver;
101 	}
102 
103 	public void setApprover(boolean approver) {
104 		this.approver = approver;
105 	}
106 
107 	public EarnCode getEarnCodeObj() {
108 		return earnCodeObj;
109 	}
110 
111 	public void setEarnCodeObj(EarnCode earnCodeObj) {
112 		this.earnCodeObj = earnCodeObj;
113 	}
114 	
115 	public String getDept() {
116 		return dept;
117 	}
118 	
119 	public void setDept(String dept) {
120 		this.dept = dept;
121 	}
122 	
123 	public String getHrSalGroup() {
124 		return hrSalGroup;
125 	}
126 	
127 	public void setHrSalGroup(String hrSalGroup) {
128 		this.hrSalGroup = hrSalGroup;
129 	}
130 	
131 	public String getEarnCode() {
132 		return earnCode;
133 	}
134 	
135 	public void setEarnCode(String earnCode) {
136 		this.earnCode = earnCode;
137 	}
138 
139 	public Job getJobObj() {
140 		return jobObj;
141 	}
142 	
143 	public void setJobObj(Job jobObj) {
144 		this.jobObj = jobObj;
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 getLocation() {
156 		return location;
157 	}
158 	
159 	public void setLocation(String location) {
160 		this.location = location;
161 	}
162 	
163 	public String getHrDeptId() {
164 		return hrDeptId;
165 	}
166 	
167 	public void setHrDeptId(String hrDeptId) {
168 		this.hrDeptId = hrDeptId;
169 	}
170 	
171 	public String getHrSalGroupId() {
172 		return hrSalGroupId;
173 	}
174 	
175 	public void setHrSalGroupId(String hrSalGroupId) {
176 		this.hrSalGroupId = hrSalGroupId;
177 	}
178 	
179 	public String getHrEarnCodeId() {
180 		return hrEarnCodeId;
181 	}
182 	
183 	public void setHrEarnCodeId(String hrEarnCodeId) {
184 		this.hrEarnCodeId = hrEarnCodeId;
185 	}
186 	
187 	public String getHrLocationId() {
188 		return hrLocationId;
189 	}
190 	
191 	public void setHrLocationId(String hrLocationId) {
192 		this.hrLocationId = hrLocationId;
193 	}
194 	
195 	@Override
196 	public String getUniqueKey() {
197 		return dept + "_" + hrSalGroup + "_" + earnCode;
198 	}
199 	
200 	public String getHistory() {
201 		return history;
202 	}
203 	
204 	public void setHistory(String history) {
205 		this.history = history;
206 	}
207 	
208 	@Override
209 	public String getId() {
210 		return getHrEarnCodeSecurityId();
211 	}
212 	
213 	@Override
214 	public void setId(String id) {
215 		setHrEarnCodeSecurityId(id);
216 	}
217 
218 }