BrightSide Workbench Full Report + Source Code
ActivityPK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2023 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.elephant.entities.db;
20 
21 import java.io.Serializable;
22 import java.util.Date;
23 import java.util.Objects;
24 
29 public class ActivityPK implements Serializable {
30 
31  private Date activityDate;
32 
33  private String entityPath;
34  private String activityPath;
35 
36  public Date getActivityDate() {
37  return activityDate;
38  }
39 
40  public void setActivityDate(Date activityDate) {
41  this.activityDate = activityDate;
42  }
43 
44  public String getEntityPath() {
45  return entityPath;
46  }
47 
48  public void setEntityPath(String entityPath) {
49  this.entityPath = entityPath;
50  }
51 
52  public String getActivityPath() {
53  return activityPath;
54  }
55 
56  public void setActivityPath(String activityPath) {
57  this.activityPath = activityPath;
58  }
59 
60  @Override
61  public int hashCode() {
62  int hash = 7;
63  hash = 37 * hash + Objects.hashCode(this.activityDate);
64  hash = 37 * hash + Objects.hashCode(this.entityPath);
65  hash = 37 * hash + Objects.hashCode(this.activityPath);
66  return hash;
67  }
68 
69  @Override
70  public boolean equals(Object obj) {
71  if (this == obj) {
72  return true;
73  }
74  if (obj == null) {
75  return false;
76  }
77  if (getClass() != obj.getClass()) {
78  return false;
79  }
80  final ActivityPK other = (ActivityPK) obj;
81  if (!Objects.equals(this.entityPath, other.entityPath)) {
82  return false;
83  }
84  if (!Objects.equals(this.activityPath, other.activityPath)) {
85  return false;
86  }
87  return Objects.equals(this.activityDate, other.activityDate);
88  }
89 
90 }
void setActivityPath(String activityPath)
Definition: ActivityPK.java:56
void setEntityPath(String entityPath)
Definition: ActivityPK.java:48
void setActivityDate(Date activityDate)
Definition: ActivityPK.java:40