package com.mossle.cms.persistence.domain;

// Generated by Hibernate Tools
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.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

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

    /** null. */
    private Long id;

    /** null. */
    private CmsSite cmsSite;

    /** null. */
    private String type;

    /** null. */
    private String name;

    /** null. */
    private String code;

    /** null. */
    private Integer priority;

    /** null. */
    private String tenantId;

    /** null. */
    private String templateCode;

    /** . */
    private Set<CmsCatalog> cmsCatalogs = new HashSet<CmsCatalog>(0);

    /** . */
    private Set<CmsSite> cmsSites = new HashSet<CmsSite>(0);

    public CmsSite() {
    }

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

    public CmsSite(Long id, CmsSite cmsSite, String type, String name,
            String code, Integer priority, String tenantId,
            String templateCode, Set<CmsCatalog> cmsCatalogs,
            Set<CmsSite> cmsSites) {
        this.id = id;
        this.cmsSite = cmsSite;
        this.type = type;
        this.name = name;
        this.code = code;
        this.priority = priority;
        this.tenantId = tenantId;
        this.templateCode = templateCode;
        this.cmsCatalogs = cmsCatalogs;
        this.cmsSites = cmsSites;
    }

    /** @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. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PARENT_ID")
    public CmsSite getCmsSite() {
        return this.cmsSite;
    }

    /**
     * @param cmsSite
     *            null.
     */
    public void setCmsSite(CmsSite cmsSite) {
        this.cmsSite = cmsSite;
    }

    /** @return null. */
    @Column(name = "TYPE", length = 50)
    public String getType() {
        return this.type;
    }

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

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

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

    /** @return null. */
    @Column(name = "CODE", length = 200)
    public String getCode() {
        return this.code;
    }

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

    /** @return null. */
    @Column(name = "PRIORITY")
    public Integer getPriority() {
        return this.priority;
    }

    /**
     * @param priority
     *            null.
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    /** @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 null. */
    @Column(name = "TEMPLATE_CODE", length = 200)
    public String getTemplateCode() {
        return this.templateCode;
    }

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

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "cmsSite")
    public Set<CmsCatalog> getCmsCatalogs() {
        return this.cmsCatalogs;
    }

    /**
     * @param cmsCatalogs
     *            .
     */
    public void setCmsCatalogs(Set<CmsCatalog> cmsCatalogs) {
        this.cmsCatalogs = cmsCatalogs;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "cmsSite")
    public Set<CmsSite> getCmsSites() {
        return this.cmsSites;
    }

    /**
     * @param cmsSites
     *            .
     */
    public void setCmsSites(Set<CmsSite> cmsSites) {
        this.cmsSites = cmsSites;
    }
}
