/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.weld.examples.permalink;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author Dan Allen
*/
public class BlogEntry {
private Long id;
private String author;
private String category;
private String title;
private Date postDate;
private String body;
private List<String> tags;
private List<Comment> comments = new ArrayList<Comment>();
public BlogEntry() {
}
public BlogEntry(Long id, String author, String category, String title, Date postDate, String body) {
this.id = id;
this.author = author;
this.category = category;
this.title = title;
this.body = body;
this.postDate = postDate;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getPostDate() {
return postDate;
}
public void setPostDate(Date postDate) {
this.postDate = postDate;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<Comment> getComments() {
return comments;
}
public void setComments(List<Comment> comments) {
this.comments = comments;
}
public int getNumComments() {
return comments == null ? 0 : comments.size();
}
}