View Javadoc
1   /**
2    *    Copyright 2009-2015 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
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   public String toString() {
106     return "Post: " + id + " : " + subject + " : " + body + " : " + section + " : " + createdOn + " (" + author + ") (" + blog + ")";
107   }
108 }