From be03e4adfe97561553c9ed2c10561c49d35c06d9 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 14 Oct 2024 11:33:31 -0400 Subject: Add basic blog enttry list This adds a basic blog entry list to the front page. Currently, the blog entries are just populated from code, but eventually they will be pulled from the database --- wotonomy-web-test/src/main/java/BlogEntry.java | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 wotonomy-web-test/src/main/java/BlogEntry.java (limited to 'wotonomy-web-test/src/main/java/BlogEntry.java') diff --git a/wotonomy-web-test/src/main/java/BlogEntry.java b/wotonomy-web-test/src/main/java/BlogEntry.java new file mode 100644 index 0000000..274dbc7 --- /dev/null +++ b/wotonomy-web-test/src/main/java/BlogEntry.java @@ -0,0 +1,75 @@ +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 + + "]"; + } +} -- cgit v1.2.3