public Book(Book source) { super(); this.isbn = source.getIsbn(); this.publishedDate = source.getPublishedDate(); this.price = source.getPrice(); this.createdDate = source.getCreatedDate(); this.lastUpdated = source.getLastUpdated(); this.title = source.getTitle(); this.authors = source.getAuthors(); this.description = source.getDescription(); this.imageLargePath = source.getImageLargePath(); this.imageMediumPath = source.getImageMediumPath(); this.imageSmallPath = source.getImageSmallPath(); }
@Override public boolean equals(Object obj) { if (obj == null || obj.getClass() != this.getClass()) { return false; } if (obj == this) { return true; } EqualsBuilder builder = new EqualsBuilder(); Book other = (Book) obj; builder .append(this.getId(), other.getId()) .append(this.getTitle(), other.getTitle()) .append(this.getIsbn(), other.getIsbn()) .append(this.getPublishedDate(), other.getPublishedDate()); return builder.isEquals(); }