001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.hr.lm.earncodesec;
017
018 import java.util.Arrays;
019 import java.util.Collections;
020 import java.util.List;
021
022 import org.kuali.hr.core.KPMEConstants;
023 import org.kuali.hr.job.Job;
024 import org.kuali.hr.location.Location;
025 import org.kuali.hr.time.HrBusinessObject;
026 import org.kuali.hr.time.department.Department;
027 import org.kuali.hr.time.earncode.EarnCode;
028 import org.kuali.hr.time.salgroup.SalGroup;
029
030 public class EarnCodeSecurity extends HrBusinessObject {
031
032 private static final long serialVersionUID = -4884673156883588639L;
033
034 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "EarnCodeSecurity";
035 private static final String[] PRIVATE_CACHES_FOR_FLUSH = {EarnCodeSecurity.CACHE_NAME, EarnCode.CACHE_NAME};
036 public static final List<String> CACHE_FLUSH = Collections.unmodifiableList(Arrays.asList(PRIVATE_CACHES_FOR_FLUSH));
037
038 private String hrEarnCodeSecurityId;
039 private String dept;
040 private String hrSalGroup;
041 private String earnCode;
042 private boolean employee;
043 private boolean approver;
044 private String location;
045 private String earnCodeType;
046
047 private String hrDeptId;
048 private String hrSalGroupId;
049 private String hrEarnCodeId;
050 private String hrLocationId;
051
052 private SalGroup salGroupObj;
053 private Department departmentObj;
054 private EarnCode earnCodeObj;
055 private Job jobObj;
056 private Location locationObj;
057 private String history;
058
059 public String getHrEarnCodeSecurityId() {
060 return hrEarnCodeSecurityId;
061 }
062
063 public void setHrEarnCodeSecurityId(String hrEarnCodeSecurityId) {
064 this.hrEarnCodeSecurityId = hrEarnCodeSecurityId;
065 }
066
067 public String getEarnCodeType() {
068 return earnCodeType;
069 }
070
071 public void setEarnCodeType(String earnCodeType) {
072 this.earnCodeType = earnCodeType;
073 }
074
075 public SalGroup getSalGroupObj() {
076 return salGroupObj;
077 }
078
079 public void setSalGroupObj(SalGroup salGroupObj) {
080 this.salGroupObj = salGroupObj;
081 }
082
083 public Department getDepartmentObj() {
084 return departmentObj;
085 }
086
087 public void setDepartmentObj(Department departmentObj) {
088 this.departmentObj = departmentObj;
089 }
090
091 public boolean isEmployee() {
092 return employee;
093 }
094
095 public void setEmployee(boolean employee) {
096 this.employee = employee;
097 }
098
099 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 }