/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hu.nir.nmail.ejb.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.Table;

/**
 *
 * @author attila
 */
@Entity
@Table(name = "nmail_setting")
@NamedQueries({})
public class NmailSetting implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    @Column(name = "mail_block_size", nullable = false)
    private int mailBlockSize;
    @Column(name = "block_waiting_time", nullable = false)
    private long blockWaitingTime;

    public NmailSetting() {
    }

    public NmailSetting(Integer id) {
        this.id = id;
    }

    public NmailSetting(Integer id, int mailBlockSize, long blockWaitingTime) {
        this.id = id;
        this.mailBlockSize = mailBlockSize;
        this.blockWaitingTime = blockWaitingTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getMailBlockSize() {
        return mailBlockSize;
    }

    public void setMailBlockSize(int mailBlockSize) {
        this.mailBlockSize = mailBlockSize;
    }

    public long getBlockWaitingTime() {
        return blockWaitingTime;
    }

    public void setBlockWaitingTime(long blockWaitingTime) {
        this.blockWaitingTime = blockWaitingTime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NmailSetting)) {
            return false;
        }
        NmailSetting other = (NmailSetting) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "hu.nir.nmail.ejb.entity.NmailSetting[id=" + id + "]";
    }

}
