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.core.task;
17  
18  import org.kuali.kpme.core.api.task.TaskContract;
19  import org.kuali.kpme.core.bo.HrBusinessObject;
20  import org.kuali.kpme.core.util.HrConstants;
21  import org.kuali.kpme.core.workarea.WorkArea;
22  
23  import com.google.common.collect.ImmutableList;
24  
25  public class Task extends HrBusinessObject implements TaskContract {
26  
27  	private static final long serialVersionUID = -7536342291963303862L;
28  
29  	public static final String CACHE_NAME = HrConstants.CacheNamespace.NAMESPACE_PREFIX + "Task";
30  	//KPME-2273/1965 Primary Business Keys List.	
31  	public static final ImmutableList<String> EQUAL_TO_FIELDS = new ImmutableList.Builder<String>()
32              .add("task")
33              .build();
34  
35      private String tkTaskId;
36      private Long task;
37      private Long workArea;
38      private String description;
39      private String administrativeDescription;
40      private String userPrincipalId;
41      
42      private WorkArea workAreaObj;
43  	
44  	public String getTkTaskId() {
45  		return tkTaskId;
46  	}
47  
48  	public void setTkTaskId(String tkTaskId) {
49  		this.tkTaskId = tkTaskId;
50  	}
51  	
52  	public Long getTask() {
53  		return task;
54  	}
55  
56  	public void setTask(Long task) {
57  		this.task = task;
58  	}
59  
60  	public Long getWorkArea() {
61  		return workArea;
62  	}
63  
64  	public void setWorkArea(Long workArea) {
65  		this.workArea = workArea;
66  	}
67  
68      public String getDescription() {
69      	return description;
70      }
71  
72      public void setDescription(String description) {
73      	this.description = description;
74      }
75      
76      public String getAdministrativeDescription() {
77      	return administrativeDescription;
78      }
79  
80      public void setAdministrativeDescription(String administrativeDescription) {
81      	this.administrativeDescription = administrativeDescription;
82      }
83  
84      public String getUserPrincipalId() {
85      	return userPrincipalId;
86      }
87  
88      public void setUserPrincipalId(String userPrincipalId) {
89      	this.userPrincipalId = userPrincipalId;
90      }
91  
92  	public WorkArea getWorkAreaObj() {
93  		return workAreaObj;
94  	}
95  
96  	public void setWorkAreaObj(WorkArea workAreaObj) {
97  		this.workAreaObj = workAreaObj;
98  	}
99  
100 	@Override
101 	public String getUniqueKey() {
102 		return workArea + "_" + task;
103 	}
104 
105 	@Override
106 	public String getId() {
107 		return getTkTaskId();
108 	}
109 
110 	@Override
111 	public void setId(String id) {
112 		setTkTaskId(id);
113 	}
114 
115 }