summaryrefslogtreecommitdiff
path: root/wotonomy-web-test/src/main/java/BlogEntry.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-10-14 11:33:31 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-10-14 11:33:31 -0400
commitbe03e4adfe97561553c9ed2c10561c49d35c06d9 (patch)
treeac39a71ef7be15bfac02d3907426f206eab7cab5 /wotonomy-web-test/src/main/java/BlogEntry.java
parentdf38659b7474d0cc00a125872b51cc399978a67f (diff)
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
Diffstat (limited to 'wotonomy-web-test/src/main/java/BlogEntry.java')
-rw-r--r--wotonomy-web-test/src/main/java/BlogEntry.java75
1 files changed, 75 insertions, 0 deletions
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
+ + "]";
+ }
+}