BrightSide Workbench Full Report + Source Code
SystemLogPK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2021 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 import org.turro.log.SystemLogType;
25 
30 public class SystemLogPK implements Serializable {
31 
32  private java.util.Date dateLog;
33 
34  private SystemLogType logType;
35 
36  private String generatorPath;
37  private String entityPath;
38 
39  public Date getDateLog() {
40  return dateLog;
41  }
42 
43  public void setDateLog(Date dateLog) {
44  this.dateLog = dateLog;
45  }
46 
48  return logType;
49  }
50 
51  public void setLogType(SystemLogType logType) {
52  this.logType = logType;
53  }
54 
55  public String getGeneratorPath() {
56  return generatorPath;
57  }
58 
59  public void setGeneratorPath(String generatorPath) {
60  this.generatorPath = generatorPath;
61  }
62 
63  public String getEntityPath() {
64  return entityPath;
65  }
66 
67  public void setEntityPath(String entityPath) {
68  this.entityPath = entityPath;
69  }
70 
71  @Override
72  public int hashCode() {
73  int hash = 7;
74  hash = 79 * hash + Objects.hashCode(this.dateLog);
75  hash = 79 * hash + Objects.hashCode(this.logType);
76  hash = 79 * hash + Objects.hashCode(this.generatorPath);
77  hash = 79 * hash + Objects.hashCode(this.entityPath);
78  return hash;
79  }
80 
81  @Override
82  public boolean equals(Object obj) {
83  if (this == obj) {
84  return true;
85  }
86  if (obj == null) {
87  return false;
88  }
89  if (getClass() != obj.getClass()) {
90  return false;
91  }
92  final SystemLogPK other = (SystemLogPK) obj;
93  if (!Objects.equals(this.generatorPath, other.generatorPath)) {
94  return false;
95  }
96  if (!Objects.equals(this.entityPath, other.entityPath)) {
97  return false;
98  }
99  if (!Objects.equals(this.dateLog, other.dateLog)) {
100  return false;
101  }
102  if (this.logType != other.logType) {
103  return false;
104  }
105  return true;
106  }
107 
108 }
void setGeneratorPath(String generatorPath)
void setLogType(SystemLogType logType)