1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.domain.blog;
17
18 import java.util.Date;
19 import java.util.List;
20
21 public class Post {
22
23 private int id;
24 private Author author;
25 private Blog blog;
26 private Date createdOn;
27 private Section section;
28 private String subject;
29 private String body;
30 private List<Comment> comments;
31 private List<Tag> tags;
32
33 public int getId() {
34 return id;
35 }
36
37 public void setId(int id) {
38 this.id = id;
39 }
40
41 public Blog getBlog() {
42 return blog;
43 }
44
45 public void setBlog(Blog blog) {
46 this.blog = blog;
47 }
48
49 public Author getAuthor() {
50 return author;
51 }
52
53 public void setAuthor(Author author) {
54 this.author = author;
55 }
56
57 public Date getCreatedOn() {
58 return createdOn;
59 }
60
61 public void setCreatedOn(Date createdOn) {
62 this.createdOn = createdOn;
63 }
64
65 public Section getSection() {
66 return section;
67 }
68
69 public void setSection(Section section) {
70 this.section = section;
71 }
72
73 public String getSubject() {
74 return subject;
75 }
76
77 public void setSubject(String subject) {
78 this.subject = subject;
79 }
80
81 public String getBody() {
82 return body;
83 }
84
85 public void setBody(String body) {
86 this.body = body;
87 }
88
89 public List<Comment> getComments() {
90 return comments;
91 }
92
93 public void setComments(List<Comment> comments) {
94 this.comments = comments;
95 }
96
97 public List<Tag> getTags() {
98 return tags;
99 }
100
101 public void setTags(List<Tag> tags) {
102 this.tags = tags;
103 }
104
105 @Override
106 public String toString() {
107 return "Post: " + id + " : " + subject + " : " + body + " : " + section + " : " + createdOn + " (" + author + ") (" + blog + ")";
108 }
109 }