/* ==================================================================
* Created [2009-4-27 下午11:32:55] by Jon.King
* ==================================================================
* TSS
* ==================================================================
* mailTo:jinpujun@hotmail.com
* Copyright (c) Jon.King, 2009-2012
* ==================================================================
*/
package com.jinhe.tss.cms.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.jinhe.tss.core.persistence.IEntity;
import com.jinhe.tss.core.web.dispaly.grid.GridAttributesMap;
import com.jinhe.tss.core.web.dispaly.grid.IGridNode;
/**
* <p> 文章评论 </p>
*/
@Entity
@Table(name = "cms_article_comment")
@SequenceGenerator(name = "ArticleComment_sequence", sequenceName = "ArticleComment_sequence", initialValue = 1, allocationSize = 1)
public class ArticleComment implements IEntity, IGridNode{
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ArticleComment_sequence")
private Long id; // 序列
private Long articleId; // 文章ID
@Column(length = 1000)
private String commentContent; // 评论内容
private String commenterName; // 评论者姓名
private Date commentTime; // 发表评论的时间
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getArticleId() {
return articleId;
}
public void setArticleId(Long articleId) {
this.articleId = articleId;
}
public String getCommentContent() {
return commentContent;
}
public void setCommentContent(String commentContent) {
this.commentContent = commentContent;
}
public String getCommenterName() {
return commenterName;
}
public void setCommenterName(String commenterName) {
this.commenterName = commenterName;
}
public Date getCommentTime() {
return commentTime;
}
public void setCommentTime(Date commentTime) {
this.commentTime = commentTime;
}
public GridAttributesMap getAttributes(GridAttributesMap map) {
map.put("id", id);
map.put("articleId", articleId);
map.put("commentContent", commentContent);
map.put("commenterName", commenterName);
map.put("commentTime", commentTime);
map.put("title", articleTitle);
return map;
}
@Transient private String articleTitle; // 文章标题
public String getArticleTitle() {
return articleTitle;
}
public void setArticleTitle(String articleTitle) {
this.articleTitle = articleTitle;
}
}