import java.io.Serializable; import java.util.Objects; import net.wotonomy.control.EOGenericRecord; import net.wotonomy.foundation.NSDate; public class BlogEntry implements Serializable { private static final long serialVersionUID = 5106301363154029769L; private String title; private String subtitle; private NSDate createdAt; private String body; public BlogEntry() { super(); } public BlogEntry(String title, String subtitle, NSDate createdAt, String body) { super(); this.title = title; this.subtitle = subtitle; this.createdAt = createdAt; this.body = body; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getSubtitle() { return subtitle; } public void setSubtitle(String subtitle) { this.subtitle = subtitle; } public NSDate getCreatedAt() { return createdAt; } public void setCreatedAt(NSDate createdAt) { this.createdAt = createdAt; } public String getBody() { return body; } public void setBody(String body) { this.body = body; } @Override public int hashCode() { return Objects.hash(body, createdAt, subtitle, title); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; BlogEntry other = (BlogEntry) obj; return Objects.equals(body, other.body) && Objects.equals(createdAt, other.createdAt) && Objects.equals(subtitle, other.subtitle) && Objects.equals(title, other.title); } @Override public String toString() { return "BlogEntry [title=" + title + ", subtitle=" + subtitle + ", createdAt=" + createdAt + ", body=" + body + "]"; } }