/*
 * 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 java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author attila
 */
@Entity
@Table(name = "email_sending_proces")
public class EmailSendingProces extends UserProces implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "email_count", nullable = false)
    private long emailCount;
    @Column(name = "sent_email", nullable = false)
    private long sentEmail;
    @Column(name = "failed_email", nullable = false)
    private long failedEmail;
    @Column(name = "end_proces")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endProces;
    @Column(name = "start_proces", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date startProces;
    @Column(name = "email", columnDefinition="bytea")
    private byte[] email;

    public EmailSendingProces() {
    }

    public EmailSendingProces(long emailCount, long sentEmail, long failedEmail, Date startProces) {
        this.emailCount = emailCount;
        this.sentEmail = sentEmail;
        this.failedEmail = failedEmail;
        this.startProces = startProces;
    }

    public long getEmailCount() {
        return emailCount;
    }

    public void setEmailCount(long emailCount) {
        this.emailCount = emailCount;
    }

    public long getSentEmail() {
        return sentEmail;
    }

    public void setSentEmail(long sentEmail) {
        this.sentEmail = sentEmail;
    }

    public long getFailedEmail() {
        return failedEmail;
    }

    public void setFailedEmail(long failedEmail) {
        this.failedEmail = failedEmail;
    }

    public Date getEndProces() {
        return endProces;
    }

    public void setEndProces(Date endProces) {
        this.endProces = endProces;
    }

    public Date getStartProces() {
        return startProces;
    }

    public void setStartProces(Date startProces) {
        this.startProces = startProces;
    }

    public byte[] getEmail() {
        return email;
    }

    public void setEmail(byte[] email) {
        this.email = email;
    }

}
