View Javadoc

1   /**
2    * Copyright 2004-2012 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.collection.rule;
17  
18  import org.kuali.hr.core.KPMEConstants;
19  import org.kuali.hr.time.HrBusinessObject;
20  import org.kuali.hr.time.authorization.DepartmentalRule;
21  import org.kuali.hr.time.department.Department;
22  import org.kuali.hr.time.paytype.PayType;
23  import org.kuali.hr.time.workarea.WorkArea;
24  
25  public class TimeCollectionRule extends HrBusinessObject implements DepartmentalRule {
26      public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "TimeCollectionRule";
27  	private static final long serialVersionUID = 1L;
28  
29  	private String tkTimeCollectionRuleId;
30  	private String dept;
31  	private Long workArea;
32  	private boolean clockUserFl;
33  	private boolean hrsDistributionF;
34  	private String userPrincipalId;
35  
36  	private String tkWorkAreaId;
37  	private String hrDeptId;
38  
39  	private Department departmentObj;
40  	private WorkArea workAreaObj;
41  	
42  	private Boolean history;
43  	
44  	// chen, 11/07/11, KPME-1152
45  	private String payType; 
46  	private String hrPayTypeId; 
47  	private PayType payTypeObj;
48  	// KPME-1152
49  
50  	
51  	public Department getDepartmentObj() {
52  		return departmentObj;
53  	}
54  
55  	public String getPayType() {
56  		return payType;
57  	}
58  
59  	public void setPayType(String payType) {
60  		this.payType = payType;
61  	}
62  
63  	public String getHrPayTypeId() {
64  		return hrPayTypeId;
65  	}
66  
67  	public void setHrPayTypeId(String hrPayTypeId) {
68  		this.hrPayTypeId = hrPayTypeId;
69  	}
70  
71  	public PayType getPayTypeObj() {
72  		return payTypeObj;
73  	}
74  
75  	public void setPayTypeObj(PayType payTypeObj) {
76  		this.payTypeObj = payTypeObj;
77  	}
78  
79  	public void setDepartmentObj(Department departmentObj) {
80  		this.departmentObj = departmentObj;
81  	}
82  
83  	public WorkArea getWorkAreaObj() {
84  		return workAreaObj;
85  	}
86  
87  	public void setWorkAreaObj(WorkArea workAreaObj) {
88  		this.workAreaObj = workAreaObj;
89  	}
90  
91  	public Long getWorkArea() {
92  		return workArea;
93  	}
94  
95  	public void setWorkArea(Long workArea) {
96  		this.workArea = workArea;
97  	}
98  
99  	public boolean isActive() {
100 		return active;
101 	}
102 
103 	public void setActive(boolean active) {
104 		this.active = active;
105 	}
106 
107 	public boolean isClockUserFl() {
108 		return clockUserFl;
109 	}
110 
111 	public void setClockUserFl(boolean clockUserFl) {
112 		this.clockUserFl = clockUserFl;
113 	}
114 
115 	public boolean isHrsDistributionF() {
116 		return hrsDistributionF;
117 	}
118 
119 	public void setHrsDistributionF(boolean hrsDistributionF) {
120 		this.hrsDistributionF = hrsDistributionF;
121 	}
122 
123 	public String getUserPrincipalId() {
124 		return userPrincipalId;
125 	}
126 
127 	public void setUserPrincipalId(String userPrincipalId) {
128 		this.userPrincipalId = userPrincipalId;
129 	}
130 
131 	public String getTkTimeCollectionRuleId() {
132 		return tkTimeCollectionRuleId;
133 	}
134 
135 	public void setTkTimeCollectionRuleId(String tkTimeCollectionRuleId) {
136 		this.tkTimeCollectionRuleId = tkTimeCollectionRuleId;
137 	}
138 
139 	public String getDept() {
140 		return dept;
141 	}
142 
143 	public void setDept(String dept) {
144 		this.dept = dept;
145 	}
146 
147 	public String getTkWorkAreaId() {
148 		return tkWorkAreaId;
149 	}
150 
151 	public void setTkWorkAreaId(String tkWorkAreaId) {
152 		this.tkWorkAreaId = tkWorkAreaId;
153 	}
154 
155 	public String getHrDeptId() {
156 		return hrDeptId;
157 	}
158 
159 	public void setHrDeptId(String hrDeptId) {
160 		this.hrDeptId = hrDeptId;
161 	}
162 
163 	@Override
164 	public String getUniqueKey() {
165 		String timeCollKey = getDept()+"_"+isClockUserFl()+"_"+isHrsDistributionF()+"_"+
166 		(getWorkArea() !=null ? getWorkArea().toString() : "");
167 
168 		return timeCollKey;
169 	}
170 
171 	@Override
172 	public String getId() {
173 		return getTkTimeCollectionRuleId();
174 	}
175 
176 	@Override
177 	public void setId(String id) {
178 		setTkTimeCollectionRuleId(id);
179 	}
180 
181 	public Boolean getHistory() {
182 		return history;
183 	}
184 
185 	public void setHistory(Boolean history) {
186 		this.history = history;
187 	}
188 
189 
190 }