Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
BaseWorkgroupMemberId |
|
| 2.8333333333333335;2.833 |
1 | /* | |
2 | * Copyright 2005-2008 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.rice.kew.workgroup; | |
17 | ||
18 | import java.io.Serializable; | |
19 | ||
20 | import javax.persistence.Column; | |
21 | ||
22 | import org.apache.commons.lang.builder.HashCodeBuilder; | |
23 | ||
24 | /** | |
25 | * This Compound Primary Class has been generated by the rice ojb2jpa Groovy script. Please | |
26 | * note that there are no setter methods, only getters. This is done purposefully as cpk classes | |
27 | * can not change after they have been created. Also note they require a public no-arg constructor. | |
28 | * TODO: Implement the equals() and hashCode() methods. | |
29 | */ | |
30 | public class BaseWorkgroupMemberId implements Serializable { | |
31 | ||
32 | @Column(name="GRP_ID") | |
33 | private Long workgroupId; | |
34 | @Column(name="WRKGRP_MBR_PRSN_EN_ID") | |
35 | private String workflowId; | |
36 | @Column(name="WRKGRP_VER_NBR") | |
37 | private Integer workgroupVersionNumber; | |
38 | ||
39 | 0 | public BaseWorkgroupMemberId() {} |
40 | ||
41 | 0 | public Long getWorkgroupId() { return workgroupId; } |
42 | ||
43 | 0 | public String getWorkflowId() { return workflowId; } |
44 | ||
45 | 0 | public Integer getWorkgroupVersionNumber() { return workgroupVersionNumber; } |
46 | ||
47 | public boolean equals(Object o) { | |
48 | 0 | if (o == this) return true; |
49 | 0 | if (!(o instanceof BaseWorkgroupMemberId)) return false; |
50 | 0 | if (o == null) return false; |
51 | 0 | BaseWorkgroupMemberId pk = (BaseWorkgroupMemberId) o; |
52 | 0 | return getWorkgroupId() != null && getWorkflowId() != null && getWorkgroupVersionNumber() != null && getWorkgroupId().equals(pk.getWorkgroupId()) && getWorkflowId().equals(pk.getWorkflowId()) && getWorkgroupVersionNumber().equals(pk.getWorkgroupVersionNumber()); |
53 | } | |
54 | ||
55 | public int hashCode() { | |
56 | 0 | return new HashCodeBuilder().append(workgroupId).append(workflowId).append(workgroupVersionNumber).toHashCode(); |
57 | } | |
58 | ||
59 | } | |
60 |