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