BrightSide Workbench Full Report + Source Code
EntityDocumentationPK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2022 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.attach.entity;
20 
21 import java.io.Serializable;
22 import java.util.Objects;
23 
28 public class EntityDocumentationPK implements Serializable {
29 
30  private String entityPath;
31  private String contactId;
32  private String documentation;
33 
34  public String getEntityPath() {
35  return entityPath;
36  }
37 
38  public void setEntityPath(String entityPath) {
39  this.entityPath = entityPath;
40  }
41 
42  public String getContactId() {
43  return contactId;
44  }
45 
46  public void setContactId(String contactId) {
47  this.contactId = contactId;
48  }
49 
50  public String getDocumentation() {
51  return documentation;
52  }
53 
54  public void setDocumentation(String documentation) {
55  this.documentation = documentation;
56  }
57 
58  @Override
59  public int hashCode() {
60  int hash = 5;
61  hash = 37 * hash + Objects.hashCode(this.entityPath);
62  hash = 37 * hash + Objects.hashCode(this.contactId);
63  hash = 37 * hash + Objects.hashCode(this.documentation);
64  return hash;
65  }
66 
67  @Override
68  public boolean equals(Object obj) {
69  if (this == obj) {
70  return true;
71  }
72  if (obj == null) {
73  return false;
74  }
75  if (getClass() != obj.getClass()) {
76  return false;
77  }
78  final EntityDocumentationPK other = (EntityDocumentationPK) obj;
79  if (!Objects.equals(this.entityPath, other.entityPath)) {
80  return false;
81  }
82  if (!Objects.equals(this.contactId, other.contactId)) {
83  return false;
84  }
85  return Objects.equals(this.documentation, other.documentation);
86  }
87 
88 }