[CORE] #17 : Ajout classe AccountUpdate

This commit is contained in:
Notmoo-PC\Notmoo 2018-01-25 00:14:40 +01:00
parent a69f936d02
commit 117ad57579
1 changed files with 43 additions and 0 deletions

View File

@ -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);
}
}