package com.mossle.workcal.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.OneToMany;
import javax.persistence.Table;

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

    /** null. */
    private Long id;

    /** null. */
    private String name;

    /** null. */
    private String tenantId;

    /** . */
    private Set<WorkcalRule> workcalRules = new HashSet<WorkcalRule>(0);

    public WorkcalType() {
    }

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

    public WorkcalType(Long id, String name, String tenantId,
            Set<WorkcalRule> workcalRules) {
        this.id = id;
        this.name = name;
        this.tenantId = tenantId;
        this.workcalRules = workcalRules;
    }

    /** @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. */
    @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 = "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 = "workcalType")
    public Set<WorkcalRule> getWorkcalRules() {
        return this.workcalRules;
    }

    /**
     * @param workcalRules
     *            .
     */
    public void setWorkcalRules(Set<WorkcalRule> workcalRules) {
        this.workcalRules = workcalRules;
    }
}
