mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-11-22 08:13:20 +00:00
[CORE] #17 : Ajout classe AccountUpdate
This commit is contained in:
parent
a69f936d02
commit
117ad57579
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user