BrightSide Workbench Full Report + Source Code
MatchingEntityPK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2020 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.matching;
20 
21 import java.io.Serializable;
22 import java.util.Objects;
23 
28 public class MatchingEntityPK implements Serializable {
29 
30  private String entityPath;
31  private String relatedPath;
32  private String concept;
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 getRelatedPath() {
43  return relatedPath;
44  }
45 
46  public void setRelatedPath(String relatedPath) {
47  this.relatedPath = relatedPath;
48  }
49 
50  public String getConcept() {
51  return concept;
52  }
53 
54  public void setConcept(String concept) {
55  this.concept = concept;
56  }
57 
58  @Override
59  public int hashCode() {
60  int hash = 3;
61  hash = 59 * hash + Objects.hashCode(this.entityPath);
62  hash = 59 * hash + Objects.hashCode(this.relatedPath);
63  hash = 59 * hash + Objects.hashCode(this.concept);
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 MatchingEntityPK other = (MatchingEntityPK) obj;
79  if (!Objects.equals(this.entityPath, other.entityPath)) {
80  return false;
81  }
82  if (!Objects.equals(this.relatedPath, other.relatedPath)) {
83  return false;
84  }
85  if (!Objects.equals(this.concept, other.concept)) {
86  return false;
87  }
88  return true;
89  }
90 
91 }
void setRelatedPath(String relatedPath)
void setEntityPath(String entityPath)