package com.mossle.card.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.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

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

    /** null. */
    private Long id;

    /** null. */
    private String code;

    /** null. */
    private String name;

    /** null. */
    private String type;

    /** null. */
    private String building;

    /** null. */
    private String floor;

    /** null. */
    private Integer priority;

    /** null. */
    private String status;

    /** null. */
    private String description;

    /** . */
    private Set<CardInfo> cardInfos = new HashSet<CardInfo>(0);

    public DoorInfo() {
    }

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

    public DoorInfo(Long id, String code, String name, String type,
            String building, String floor, Integer priority, String status,
            String description, Set<CardInfo> cardInfos) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.type = type;
        this.building = building;
        this.floor = floor;
        this.priority = priority;
        this.status = status;
        this.description = description;
        this.cardInfos = cardInfos;
    }

    /** @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 = "CODE", length = 50)
    public String getCode() {
        return this.code;
    }

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

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

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

    /** @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 = "BUILDING", length = 100)
    public String getBuilding() {
        return this.building;
    }

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

    /** @return null. */
    @Column(name = "FLOOR", length = 100)
    public String getFloor() {
        return this.floor;
    }

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

    /** @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 = "STATUS", length = 50)
    public String getStatus() {
        return this.status;
    }

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

    /** @return null. */
    @Column(name = "DESCRIPTION", length = 200)
    public String getDescription() {
        return this.description;
    }

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

    /** @return . */
    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "CARD_INFO_DOOR", joinColumns = { @JoinColumn(name = "DOOR_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "INFO_ID", nullable = false, updatable = false) })
    public Set<CardInfo> getCardInfos() {
        return this.cardInfos;
    }

    /**
     * @param cardInfos
     *            .
     */
    public void setCardInfos(Set<CardInfo> cardInfos) {
        this.cardInfos = cardInfos;
    }
}
