/*
 * 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 TlogloadPK implements Serializable {

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

    public TlogloadPK() {
    }

    public TlogloadPK(String journalid, long loadsequence) {
        this.journalid = journalid;
        this.loadsequence = loadsequence;
    }

    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;
    }

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

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