예제 #1
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    User user = (User) o;

    if (isConfirmed != user.isConfirmed) return false;
    if (isEnabled != user.isEnabled) return false;
    if (isNonReadOnly != user.isNonReadOnly) return false;
    if (Double.compare(user.rating, rating) != 0) return false;
    if (tasksSolved != user.tasksSolved) return false;
    if (country != null ? !country.equals(user.country) : user.country != null) return false;
    if (creationDate != null ? !creationDate.equals(user.creationDate) : user.creationDate != null)
      return false;
    if (email != null ? !email.equals(user.email) : user.email != null) return false;
    if (fullName != null ? !fullName.equals(user.fullName) : user.fullName != null) return false;
    if (id != null ? !id.equals(user.id) : user.id != null) return false;
    if (imageUrl != null ? !imageUrl.equals(user.imageUrl) : user.imageUrl != null) return false;
    if (lastVisit != null ? !lastVisit.equals(user.lastVisit) : user.lastVisit != null)
      return false;
    if (password != null ? !password.equals(user.password) : user.password != null) return false;
    if (roles != null ? !roles.equals(user.roles) : user.roles != null) return false;
    if (signInProvider != user.signInProvider) return false;
    if (tokenConfirmation != null
        ? !tokenConfirmation.equals(user.tokenConfirmation)
        : user.tokenConfirmation != null) return false;
    if (username != null ? !username.equals(user.username) : user.username != null) return false;

    return true;
  }
예제 #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   DevoxxUser other = (DevoxxUser) obj;
   if (enabled != other.enabled) return false;
   if (rulesApproved != other.rulesApproved) return false;
   if (userEmail == null) {
     if (other.userEmail != null) return false;
   } else if (!userEmail.equals(other.userEmail)) return false;
   if (userForname == null) {
     if (other.userForname != null) return false;
   } else if (!userForname.equals(other.userForname)) return false;
   if (userRoles == null) {
     if (other.userRoles != null) return false;
   } else if (!userRoles.equals(other.userRoles)) return false;
   if (username == null) {
     if (other.username != null) return false;
   } else if (!username.equals(other.username)) return false;
   return true;
 }