package com.mossle.model.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;

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

    /** null. */
    private Long id;

    /** null. */
    private ModelCategory modelCategory;

    /** null. */
    private String catalog;

    /** null. */
    private String code;

    /** null. */
    private String label;

    /** null. */
    private String type;

    /** null. */
    private Integer priority;

    /** null. */
    private String tenantId;

    /** . */
    private Set<ModelItem> modelItems = new HashSet<ModelItem>(0);

    public ModelSchema() {
    }

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

    public ModelSchema(Long id, ModelCategory modelCategory, String catalog,
            String code, String label, String type, Integer priority,
            String tenantId, Set<ModelItem> modelItems) {
        this.id = id;
        this.modelCategory = modelCategory;
        this.catalog = catalog;
        this.code = code;
        this.label = label;
        this.type = type;
        this.priority = priority;
        this.tenantId = tenantId;
        this.modelItems = modelItems;
    }

    /** @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 = "CATEGORY_ID")
    public ModelCategory getModelCategory() {
        return this.modelCategory;
    }

    /**
     * @param modelCategory
     *            null.
     */
    public void setModelCategory(ModelCategory modelCategory) {
        this.modelCategory = modelCategory;
    }

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

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

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

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

    /** @return null. */
    @Column(name = "LABEL", length = 200)
    public String getLabel() {
        return this.label;
    }

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

    /** @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 = "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 . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "modelSchema")
    public Set<ModelItem> getModelItems() {
        return this.modelItems;
    }

    /**
     * @param modelItems
     *            .
     */
    public void setModelItems(Set<ModelItem> modelItems) {
        this.modelItems = modelItems;
    }
}
