package com.mossle.model.persistence.domain;

// Generated by Hibernate Tools
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.Table;

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

    /** null. */
    private Long id;

    /** null. */
    private ModelSchema modelSchema;

    /** null. */
    private ModelRow modelRow;

    /** null. */
    private ModelBase modelBase;

    /** null. */
    private String code;

    /** null. */
    private String value;

    /** null. */
    private String type;

    /** null. */
    private String tenantId;

    public ModelItem() {
    }

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

    public ModelItem(Long id, ModelSchema modelSchema, ModelRow modelRow,
            ModelBase modelBase, String code, String value, String type,
            String tenantId) {
        this.id = id;
        this.modelSchema = modelSchema;
        this.modelRow = modelRow;
        this.modelBase = modelBase;
        this.code = code;
        this.value = value;
        this.type = type;
        this.tenantId = tenantId;
    }

    /** @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 = "SCHEMA_ID")
    public ModelSchema getModelSchema() {
        return this.modelSchema;
    }

    /**
     * @param modelSchema
     *            null.
     */
    public void setModelSchema(ModelSchema modelSchema) {
        this.modelSchema = modelSchema;
    }

    /** @return null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ROW_ID")
    public ModelRow getModelRow() {
        return this.modelRow;
    }

    /**
     * @param modelRow
     *            null.
     */
    public void setModelRow(ModelRow modelRow) {
        this.modelRow = modelRow;
    }

    /** @return null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "BASE_ID")
    public ModelBase getModelBase() {
        return this.modelBase;
    }

    /**
     * @param modelBase
     *            null.
     */
    public void setModelBase(ModelBase modelBase) {
        this.modelBase = modelBase;
    }

    /** @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 = "VALUE", length = 200)
    public String getValue() {
        return this.value;
    }

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

    /** @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 = "TENANT_ID", length = 64)
    public String getTenantId() {
        return this.tenantId;
    }

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