package com.mossle.cms.persistence.domain;

// Generated by Hibernate Tools
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CommentThread .
 * 
 * @author Lingo
 */
@Entity
@Table(name = "COMMENT_THREAD")
public class CommentThread implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** null. */
    private Long id;

    /** null. */
    private String url;

    /** null. */
    private String sourceId;

    /** null. */
    private Date createTime;

    /** null. */
    private String tenantId;

    /** . */
    private Set<CommentInfo> commentInfos = new HashSet<CommentInfo>(0);

    public CommentThread() {
    }

    public CommentThread(Long id) {
        this.id = id;
    }

    public CommentThread(Long id, String url, String sourceId, Date createTime,
            String tenantId, Set<CommentInfo> commentInfos) {
        this.id = id;
        this.url = url;
        this.sourceId = sourceId;
        this.createTime = createTime;
        this.tenantId = tenantId;
        this.commentInfos = commentInfos;
    }

    /** @return null. */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            null.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return null. */
    @Column(name = "URL", length = 200)
    public String getUrl() {
        return this.url;
    }

    /**
     * @param url
     *            null.
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /** @return null. */
    @Column(name = "SOURCE_ID", length = 50)
    public String getSourceId() {
        return this.sourceId;
    }

    /**
     * @param sourceId
     *            null.
     */
    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    /** @return null. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATE_TIME", length = 26)
    public Date getCreateTime() {
        return this.createTime;
    }

    /**
     * @param createTime
     *            null.
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /** @return null. */
    @Column(name = "TENANT_ID", length = 64)
    public String getTenantId() {
        return this.tenantId;
    }

    /**
     * @param tenantId
     *            null.
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "commentThread")
    public Set<CommentInfo> getCommentInfos() {
        return this.commentInfos;
    }

    /**
     * @param commentInfos
     *            .
     */
    public void setCommentInfos(Set<CommentInfo> commentInfos) {
        this.commentInfos = commentInfos;
    }
}
