Add Pet entity in es.uvigo.esei.daa.entities

parent 223f2f1d
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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment