/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.qsoft.rs.sincoar.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author developer2
 */
@Embeddable
public class TlogloaderrorPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "JOURNALID")
    private String journalid;
    @Basic(optional = false)
    @Column(name = "LOADSEQUENCE")
    private long loadsequence;
    @Basic(optional = false)
    @Column(name = "ERRORSEQUENCE")
    private short errorsequence;

    public TlogloaderrorPK() {
    }

    public TlogloaderrorPK(String journalid, long loadsequence, short errorsequence) {
        this.journalid = journalid;
        this.loadsequence = loadsequence;
        this.errorsequence = errorsequence;
    }

    public String getJournalid() {
        return journalid;
    }

    public void setJournalid(String journalid) {
        this.journalid = journalid;
    }

    public long getLoadsequence() {
        return loadsequence;
    }

    public void setLoadsequence(long loadsequence) {
        this.loadsequence = loadsequence;
    }

    public short getErrorsequence() {
        return errorsequence;
    }

    public void setErrorsequence(short errorsequence) {
        this.errorsequence = errorsequence;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (journalid != null ? journalid.hashCode() : 0);
        hash += (int) loadsequence;
        hash += (int) errorsequence;
        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 TlogloaderrorPK)) {
            return false;
        }
        TlogloaderrorPK other = (TlogloaderrorPK) object;
        if ((this.journalid == null && other.journalid != null) || (this.journalid != null && !this.journalid.equals(other.journalid))) {
            return false;
        }
        if (this.loadsequence != other.loadsequence) {
            return false;
        }
        if (this.errorsequence != other.errorsequence) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TlogloaderrorPK[ journalid=" + journalid + ", loadsequence=" + loadsequence + ", errorsequence=" + errorsequence + " ]";
    }
    
}
