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

    @Basic(optional = false)
    @Column(name = "JOURNALID")
    private String journalid;
    @Basic(optional = false)
    @Column(name = "ACTIVITYNAME")
    private String activityname;
    @Basic(optional = false)
    @Column(name = "SEQUENCE")
    private long sequence;

    public TbpmactivitiesPK() {
    }

    public TbpmactivitiesPK(String journalid, String activityname, long sequence) {
        this.journalid = journalid;
        this.activityname = activityname;
        this.sequence = sequence;
    }

    public String getJournalid() {
        return journalid;
    }

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

    public String getActivityname() {
        return activityname;
    }

    public void setActivityname(String activityname) {
        this.activityname = activityname;
    }

    public long getSequence() {
        return sequence;
    }

    public void setSequence(long sequence) {
        this.sequence = sequence;
    }

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

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