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

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

    public TsafepasswordPK() {
    }

    public TsafepasswordPK(long companycode, String channelcode) {
        this.companycode = companycode;
        this.channelcode = channelcode;
    }

    public long getCompanycode() {
        return companycode;
    }

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

    public String getChannelcode() {
        return channelcode;
    }

    public void setChannelcode(String channelcode) {
        this.channelcode = channelcode;
    }

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

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