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.earngroup;
17  
18  import org.apache.commons.lang.StringUtils;
19  import org.kuali.hr.time.earncode.EarnCode;
20  import org.kuali.hr.time.service.base.TkServiceLocator;
21  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22  
23  import java.util.LinkedHashMap;
24  
25  public class EarnGroupDefinition extends PersistableBusinessObjectBase {
26  
27  	/**
28  	 * 
29  	 */
30  	private static final long serialVersionUID = -8463674251885306591L;
31  
32  	private String hrEarnGroupDefId;
33  
34  	private String earnCode;
35  
36  	private String hrEarnGroupId;
37  
38      private EarnCode earnCodeObj;
39  
40      // this is for the maintenance screen
41      private String earnCodeDesc;
42  
43  	public String getEarnCode() {
44  		return earnCode;
45  	}
46  
47  	public void setEarnCode(String earnCode) {
48  		this.earnCode = earnCode;
49  	}
50  
51  	public String getHrEarnGroupDefId() {
52  		return hrEarnGroupDefId;
53  	}
54  
55  	public void setHrEarnGroupDefId(String hrEarnGroupDefId) {
56  		this.hrEarnGroupDefId = hrEarnGroupDefId;
57  	}
58  
59  	public String getHrEarnGroupId() {
60  		return hrEarnGroupId;
61  	}
62  
63  	public void setHrEarnGroupId(String hrEarnGroupId) {
64  		this.hrEarnGroupId = hrEarnGroupId;
65  	}
66  
67  	public EarnCode getEarnCodeObj() {
68  		return earnCodeObj;
69  	}
70  
71  	public void setEarnCodeObj(EarnCode earnCodeObj) {
72  		this.earnCodeObj = earnCodeObj;
73  	}
74  	
75  	// this is for the maintenance screen
76  	public String getEarnCodeDesc() {
77  		EarnCode earnCode = TkServiceLocator.getEarnCodeService().getEarnCode(this.earnCode, new java.sql.Date(System.currentTimeMillis()));
78  		
79  		if(earnCode != null && StringUtils.isNotBlank(earnCode.getDescription())) {
80  			return earnCode.getDescription();
81  		}
82  		return "";
83  	}
84  }