summaryrefslogtreecommitdiff
path: root/wotonomy-web-test/src/main/java/BlogEntry.java
blob: 274dbc7edc9760fbb9a5f7909efc54ad0d332880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
				+ "]";
	}
}