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;

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

    /** null. */
    private Long id;

    /** null. */
    private ModelBase modelBase;

    /** null. */
    private String priority;

    /** null. */
    private String tenantId;

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

    public ModelRow() {
    }

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

    public ModelRow(Long id, ModelBase modelBase, String priority,
            String tenantId, Set<ModelItem> modelItems) {
        this.id = id;
        this.modelBase = modelBase;
        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 = "BASE_ID")
    public ModelBase getModelBase() {
        return this.modelBase;
    }

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

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

    /**
     * @param priority
     *            null.
     */
    public void setPriority(String 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 = "modelRow")
    public Set<ModelItem> getModelItems() {
        return this.modelItems;
    }

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