import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import java.io.Serializable;
public class Main implements Serializable {
private Long id;
private String title;
private String author;
public int hashCode() {
return new HashCodeBuilder().append(id).append(title).append(author).toHashCode();
// return HashCodeBuilder.reflectionHashCode(this);
}
}
|