Пример #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   CommentEntity other = (CommentEntity) obj;
   if (authorName == null) {
     if (other.authorName != null) {
       return false;
     }
   } else if (!authorName.equals(other.authorName)) {
     return false;
   }
   if (commentText == null) {
     if (other.commentText != null) {
       return false;
     }
   } else if (!commentText.equals(other.commentText)) {
     return false;
   }
   if (email == null) {
     if (other.email != null) {
       return false;
     }
   } else if (!email.equals(other.email)) {
     return false;
   }
   if (questionEntity == null) {
     if (other.questionEntity != null) {
       return false;
     }
   } else if (!questionEntity.equals(other.questionEntity)) {
     return false;
   }
   if (rate != other.rate) {
     return false;
   }
   if (userpicUrl == null) {
     if (other.userpicUrl != null) {
       return false;
     }
   } else if (!userpicUrl.equals(other.userpicUrl)) {
     return false;
   }
   return true;
 }