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

    @Basic(optional = false)
    @Column(name = "FLOWCODE")
    private String flowcode;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;

    public TbpmflowsPK() {
    }

    public TbpmflowsPK(String flowcode, long companycode) {
        this.flowcode = flowcode;
        this.companycode = companycode;
    }

    public String getFlowcode() {
        return flowcode;
    }

    public void setFlowcode(String flowcode) {
        this.flowcode = flowcode;
    }

    public long getCompanycode() {
        return companycode;
    }

    public void setCompanycode(long companycode) {
        this.companycode = companycode;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TbpmflowsPK[ flowcode=" + flowcode + ", companycode=" + companycode + " ]";
    }
    
}
