Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DocumentTypePolicyId |
|
| 4.6;4.6 |
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.doctype; | |
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 DocumentTypePolicyId implements Serializable { | |
29 | ||
30 | @Column(name="DOC_TYP_ID") | |
31 | private Long documentTypeId; | |
32 | @Column(name="DOC_PLCY_NM") | |
33 | private String policyName; | |
34 | ||
35 | 0 | public DocumentTypePolicyId() {} |
36 | ||
37 | 0 | public Long getDocumentTypeId() { return documentTypeId; } |
38 | ||
39 | 0 | public String getPolicyName() { return policyName; } |
40 | ||
41 | /** | |
42 | * This overridden method ... | |
43 | * | |
44 | * @see java.lang.Object#hashCode() | |
45 | */ | |
46 | @Override | |
47 | public int hashCode() { | |
48 | 0 | final int prime = 31; |
49 | 0 | int result = 1; |
50 | 0 | result = prime |
51 | * result | |
52 | + ((this.documentTypeId == null) ? 0 : this.documentTypeId | |
53 | .hashCode()); | |
54 | 0 | result = prime * result |
55 | + ((this.policyName == null) ? 0 : this.policyName.hashCode()); | |
56 | 0 | return result; |
57 | } | |
58 | ||
59 | /** | |
60 | * This overridden method ... | |
61 | * | |
62 | * @see java.lang.Object#equals(java.lang.Object) | |
63 | */ | |
64 | @Override | |
65 | public boolean equals(Object obj) { | |
66 | 0 | if (this == obj) |
67 | 0 | return true; |
68 | 0 | if (obj == null) |
69 | 0 | return false; |
70 | 0 | if (getClass() != obj.getClass()) |
71 | 0 | return false; |
72 | 0 | final DocumentTypePolicyId other = (DocumentTypePolicyId) obj; |
73 | 0 | if (this.documentTypeId == null) { |
74 | 0 | if (other.documentTypeId != null) |
75 | 0 | return false; |
76 | 0 | } else if (!this.documentTypeId.equals(other.documentTypeId)) |
77 | 0 | return false; |
78 | 0 | if (this.policyName == null) { |
79 | 0 | if (other.policyName != null) |
80 | 0 | return false; |
81 | 0 | } else if (!this.policyName.equals(other.policyName)) |
82 | 0 | return false; |
83 | 0 | return true; |
84 | } | |
85 | ||
86 | /* | |
87 | public boolean equals(Object o) { | |
88 | if (o == this) return true; | |
89 | if (!(o instanceof DocumentTypePolicyId)) return false; | |
90 | if (o == null) return false; | |
91 | DocumentTypePolicyId pk = (DocumentTypePolicyId) o; | |
92 | // TODO: Finish implementing this method. Compare o to pk and return true or false. | |
93 | throw new UnsupportedOperationException("Please implement me!"); | |
94 | } | |
95 | ||
96 | public int hashCode() { | |
97 | // TODO: Implement this method | |
98 | throw new UnsupportedOperationException("Please implement me!"); | |
99 | } | |
100 | */ | |
101 | ||
102 | } | |
103 |