package com.lst.lc.entities;
// Generated 2015-7-18 14:55:52 by Hibernate Tools 4.3.1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* BlogComment generated by hbm2java
*/
@Entity
@Table(name = "blogComment", catalog = "LearningCommunity")
public class BlogComment implements java.io.Serializable {
private Integer commentId;
private Blog blog;
private User user;
private Date time;
private String content;
private String head;
public BlogComment() {
}
public BlogComment(Blog blog, User user, Date time, String content) {
this.blog = blog;
this.user = user;
this.time = time;
this.content = content;
}
public BlogComment(Blog blog, User user, Date time, String content,
String head) {
this.blog = blog;
this.user = user;
this.time = time;
this.content = content;
this.head = head;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "commentId", unique = true, nullable = false)
public Integer getCommentId() {
return this.commentId;
}
public void setCommentId(Integer commentId) {
this.commentId = commentId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "blogId", nullable = false)
public Blog getBlog() {
return this.blog;
}
public void setBlog(Blog blog) {
this.blog = blog;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "authorId", nullable = false)
public User getUser() {
return this.user;
}
public void setUser(User user) {
this.user = user;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "time", nullable = false, length = 19)
public Date getTime() {
return this.time;
}
public void setTime(Date time) {
this.time = time;
}
@Column(name = "content", nullable = false, length = 65535)
public String getContent() {
return this.content;
}
public void setContent(String content) {
this.content = content;
}
@Column(name = "head", length = 200)
public String getHead() {
return this.head;
}
public void setHead(String head) {
this.head = head;
}
}