import project

This commit is contained in:
Fabio Scotto di Santolo
2023-10-01 14:26:53 +02:00
parent 007b7f2dcc
commit 82e0977599
30 changed files with 2066 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
package org.acme;
import java.time.LocalDateTime;
import java.util.Objects;
public class UserDeleted implements CollectEvent {
private long id;
private LocalDateTime timestamp;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public LocalDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(LocalDateTime timestamp) {
this.timestamp = timestamp;
}
@Override
public CollectEvent.Type getType() {
return Type.DELETE;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserDeleted that = (UserDeleted) o;
return getId() == that.getId() && Objects.equals(getTimestamp(), that.getTimestamp());
}
@Override
public int hashCode() {
return Objects.hash(getId(), getTimestamp());
}
@Override
public String toString() {
return "UserDeleted{" +
"id=" + id +
", timestamp=" + timestamp +
'}';
}
}