diff --git a/src/main/java/es/uvigo/esei/daa/entities/Pet.java b/src/main/java/es/uvigo/esei/daa/entities/Pet.java new file mode 100644 index 0000000000000000000000000000000000000000..40cba5e188082d4fe00392111c4ddfd4468368e8 --- /dev/null +++ b/src/main/java/es/uvigo/esei/daa/entities/Pet.java @@ -0,0 +1,70 @@ +package es.uvigo.esei.daa.entities; + +import static java.util.Objects.requireNonNull; + + +public class Pet { + private int idPet; + private String name; + private int idMaster; + + + public Pet() { + + } + + + + public Pet(int idPet, String name, int idMaster) { + super(); + this.idPet = idPet; + this.name = name; + this.idMaster = idMaster; + } + + + + public int getIdPet() { + return idPet; + } + public void setIdPet(int idPet) { + this.idPet = idPet; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public int getIdMaster() { + return idMaster; + } + public void setIdMaster(int idMaster) { + this.idMaster = idMaster; + } + + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + this.idPet; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof Pet)) + return false; + Pet other = (Pet) obj; + if (this.idPet != other.idPet) + return false; + return true; + } + +}