package com.mossle.internal.whitelist.persistence.domain;

// Generated by Hibernate Tools
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

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

    /** null. */
    private Long id;

    /** null. */
    private WhitelistApp whitelistApp;

    /** null. */
    private String value;

    /** null. */
    private Integer priority;

    public WhitelistHost() {
    }

    public WhitelistHost(WhitelistApp whitelistApp, String value,
            Integer priority) {
        this.whitelistApp = whitelistApp;
        this.value = value;
        this.priority = priority;
    }

    /** @return null. */
    @Id
    @GeneratedValue
    @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 = "APP_ID")
    public WhitelistApp getWhitelistApp() {
        return this.whitelistApp;
    }

    /**
     * @param whitelistApp
     *            null.
     */
    public void setWhitelistApp(WhitelistApp whitelistApp) {
        this.whitelistApp = whitelistApp;
    }

    /** @return null. */
    @Column(name = "VALUE", length = 50)
    public String getValue() {
        return this.value;
    }

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

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

    /**
     * @param priority
     *            null.
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
