示例#1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
   result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
   result = prime * result + ((birthdate == null) ? 0 : birthdate.hashCode());
   result = prime * result + ((active == null) ? 0 : active.hashCode());
   result = prime * result + ((role == null) ? 0 : role.hashCode());
   result = prime * result + ((email == null) ? 0 : email.hashCode());
   return result;
 }
示例#2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   final SignUpResponse other = (SignUpResponse) obj;
   if ((id == null && other.id != null) || !id.equals(other.id)) return false;
   if ((firstName == null && other.firstName != null) || !firstName.equals(other.firstName))
     return false;
   if ((lastName == null && other.lastName != null) || !lastName.equals(other.lastName))
     return false;
   if ((birthdate == null && other.birthdate != null) || !birthdate.equals(other.birthdate))
     return false;
   if ((active == null && other.active != null) || !active.equals(other.active)) return false;
   if ((role == null && other.role != null) || !role.equals(other.role)) return false;
   if ((email == null && other.email != null) || !email.equals(other.email)) return false;
   return true;
 }