From 117ad575796a04fa9f8158643ab9097c69bb898c Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Thu, 25 Jan 2018 00:14:40 +0100 Subject: [PATCH] [CORE] #17 : Ajout classe AccountUpdate --- .../entities/user_account/AccountUpdate.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Workspace/core/src/main/java/com/pqt/core/entities/user_account/AccountUpdate.java diff --git a/Workspace/core/src/main/java/com/pqt/core/entities/user_account/AccountUpdate.java b/Workspace/core/src/main/java/com/pqt/core/entities/user_account/AccountUpdate.java new file mode 100644 index 00000000..d316e61b --- /dev/null +++ b/Workspace/core/src/main/java/com/pqt/core/entities/user_account/AccountUpdate.java @@ -0,0 +1,43 @@ +package com.pqt.core.entities.user_account; + +import java.util.Objects; + +public class AccountUpdate { + + private Account oldVersion, newVersion; + + public AccountUpdate(Account oldVersion, Account newVersion) { + this.oldVersion = oldVersion; + this.newVersion = newVersion; + } + + public Account getOldVersion() { + return oldVersion; + } + + public void setOldVersion(Account oldVersion) { + this.oldVersion = oldVersion; + } + + public Account getNewVersion() { + return newVersion; + } + + public void setNewVersion(Account newVersion) { + this.newVersion = newVersion; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AccountUpdate that = (AccountUpdate) o; + return Objects.equals(oldVersion, that.oldVersion) && + Objects.equals(newVersion, that.newVersion); + } + + @Override + public int hashCode() { + return Objects.hash(oldVersion, newVersion); + } +}