View Javadoc
1   /**
2    * Copyright 2004-2014 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.kpme.tklm.time.rules.clocklocation;
17  
18  import org.kuali.kpme.core.bo.HrBusinessObject;
19  import org.kuali.kpme.tklm.api.time.rules.clocklocation.ClockLocationRuleIpAddressContract;
20  
21  import com.google.common.collect.ImmutableMap;
22  
23  public class ClockLocationRuleIpAddress extends HrBusinessObject implements ClockLocationRuleIpAddressContract {
24  
25  	private static final long serialVersionUID = 1L;
26  	private String tkClockLocationRuleIpId;
27  	private String tkClockLocationRuleId;
28  	private String ipAddress;
29  	
30  	// TODO returning an empty map for the time-being, until the BK is finalized
31  	@Override
32  	public ImmutableMap<String, Object> getBusinessKeyValuesMap() {
33  		return new ImmutableMap.Builder<String, Object>()
34  				.build();
35  	}
36  	
37  	@Override
38  	public String getId() {
39  		return this.getTkClockLocationRuleIpId();
40  	}
41  
42  	@Override
43  	public void setId(String id) {
44  		this.setTkClockLocationRuleIpId(id);
45  	}
46  	@Override
47  	public String getUniqueKey() {
48  		String ipAddressKey = getTkClockLocationRuleIpId().toString()
49  			+"_"+ getTkClockLocationRuleId().toString() + "_" + getIpAddress();
50  		return ipAddressKey;
51  	}
52  
53  	public String getIpAddress() {
54  		return ipAddress;
55  	}
56  
57  	public void setIpAddress(String ipAddress) {
58  		this.ipAddress = ipAddress;
59  	}
60  
61  	public String getTkClockLocationRuleIpId() {
62  		return tkClockLocationRuleIpId;
63  	}
64  
65  	public void setTkClockLocationRuleIpId(String tkClockLocationRuleIpId) {
66  		this.tkClockLocationRuleIpId = tkClockLocationRuleIpId;
67  	}
68  
69  	public String getTkClockLocationRuleId() {
70  		return tkClockLocationRuleId;
71  	}
72  
73  	public void setTkClockLocationRuleId(String tkClockLocationRuleId) {
74  		this.tkClockLocationRuleId = tkClockLocationRuleId;
75  	}
76  
77  }