Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
UserOptionsId |
|
| 2.8;2.8 |
1 | /** | |
2 | * Copyright 2005-2011 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.useroptions; | |
17 | ||
18 | import java.io.Serializable; | |
19 | ||
20 | import javax.persistence.Column; | |
21 | ||
22 | /** | |
23 | * This Compound Primary Class has been generated by the rice ojb2jpa Groovy script. Please | |
24 | * note that there are no setter methods, only getters. This is done purposefully as cpk classes | |
25 | * can not change after they have been created. Also note they require a public no-arg constructor. | |
26 | * TODO: Implement the equals() and hashCode() methods. | |
27 | */ | |
28 | public class UserOptionsId implements Serializable { | |
29 | ||
30 | private static final long serialVersionUID = -982957447172014416L; | |
31 | ||
32 | @Column(name="PRSN_OPTN_ID") | |
33 | private String optionId; | |
34 | @Column(name="PRNCPL_ID") | |
35 | private String workflowId; | |
36 | ||
37 | 0 | public UserOptionsId() {} |
38 | ||
39 | 0 | public String getOptionId() { return optionId; } |
40 | ||
41 | 0 | public String getWorkflowId() { return workflowId; } |
42 | ||
43 | public boolean equals(Object o) { | |
44 | 0 | if (o == this) return true; |
45 | 0 | if (!(o instanceof UserOptionsId)) return false; |
46 | 0 | if (o == null) return false; |
47 | 0 | UserOptionsId pk = (UserOptionsId) o; |
48 | 0 | return getOptionId() != null && getWorkflowId() != null && getOptionId().equals(pk.getOptionId()) && getWorkflowId().equals(pk.getWorkflowId()); |
49 | } | |
50 | ||
51 | public int hashCode() { | |
52 | 0 | return (getOptionId() + getWorkflowId()).hashCode(); |
53 | } | |
54 | ||
55 | } | |
56 |