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;

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

    /** null. */
    private Long id;

    /** null. */
    private CmsTemplateCatalog cmsTemplateCatalog;

    /** null. */
    private String type;

    /** null. */
    private String name;

    /** null. */
    private Integer priority;

    /** null. */
    private String path;

    /** null. */
    private String tenantId;

    /** . */
    private Set<CmsTemplateContent> cmsTemplateContents = new HashSet<CmsTemplateContent>(
            0);

    /** . */
    private Set<CmsTemplateCatalog> cmsTemplateCatalogs = new HashSet<CmsTemplateCatalog>(
            0);

    public CmsTemplateCatalog() {
    }

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

    public CmsTemplateCatalog(Long id, CmsTemplateCatalog cmsTemplateCatalog,
            String type, String name, Integer priority, String path,
            String tenantId, Set<CmsTemplateContent> cmsTemplateContents,
            Set<CmsTemplateCatalog> cmsTemplateCatalogs) {
        this.id = id;
        this.cmsTemplateCatalog = cmsTemplateCatalog;
        this.type = type;
        this.name = name;
        this.priority = priority;
        this.path = path;
        this.tenantId = tenantId;
        this.cmsTemplateContents = cmsTemplateContents;
        this.cmsTemplateCatalogs = cmsTemplateCatalogs;
    }

    /** @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 CmsTemplateCatalog getCmsTemplateCatalog() {
        return this.cmsTemplateCatalog;
    }

    /**
     * @param cmsTemplateCatalog
     *            null.
     */
    public void setCmsTemplateCatalog(CmsTemplateCatalog cmsTemplateCatalog) {
        this.cmsTemplateCatalog = cmsTemplateCatalog;
    }

    /** @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 = "PRIORITY")
    public Integer getPriority() {
        return this.priority;
    }

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

    /** @return null. */
    @Column(name = "PATH", length = 200)
    public String getPath() {
        return this.path;
    }

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

    /** @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 = "cmsTemplateCatalog")
    public Set<CmsTemplateContent> getCmsTemplateContents() {
        return this.cmsTemplateContents;
    }

    /**
     * @param cmsTemplateContents
     *            .
     */
    public void setCmsTemplateContents(
            Set<CmsTemplateContent> cmsTemplateContents) {
        this.cmsTemplateContents = cmsTemplateContents;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "cmsTemplateCatalog")
    public Set<CmsTemplateCatalog> getCmsTemplateCatalogs() {
        return this.cmsTemplateCatalogs;
    }

    /**
     * @param cmsTemplateCatalogs
     *            .
     */
    public void setCmsTemplateCatalogs(
            Set<CmsTemplateCatalog> cmsTemplateCatalogs) {
        this.cmsTemplateCatalogs = cmsTemplateCatalogs;
    }
}
