package JavaBean; public class Book { private int bookId; private String bookname; private Double price; private String category; private String imageurl; private Integer sellerId; public int getBookId() { return bookId; } public void setBookId(int bookId) { this.bookId = bookId; } public String getBookname() { return bookname; } public void setBookname(String bookname) { this.bookname = bookname; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getImageurl() { return imageurl; } public void setImageurl(String imageurl) { this.imageurl = imageurl; } public Integer getSellerId() { return sellerId; } public void setSellerId(Integer sellerId) { this.sellerId = sellerId; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; if (bookId != book.bookId) return false; if (bookname != null ? !bookname.equals(book.bookname) : book.bookname != null) return false; if (price != null ? !price.equals(book.price) : book.price != null) return false; if (category != null ? !category.equals(book.category) : book.category != null) return false; if (imageurl != null ? !imageurl.equals(book.imageurl) : book.imageurl != null) return false; if (sellerId != null ? !sellerId.equals(book.sellerId) : book.sellerId != null) return false; return true; } @Override public int hashCode() { int result = bookId; result = 31 * result + (bookname != null ? bookname.hashCode() : 0); result = 31 * result + (price != null ? price.hashCode() : 0); result = 31 * result + (category != null ? category.hashCode() : 0); result = 31 * result + (imageurl != null ? imageurl.hashCode() : 0); result = 31 * result + (sellerId != null ? sellerId.hashCode() : 0); return result; } }