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

    @Basic(optional = false)
    @Column(name = "ACCOUNT")
    private String account;
    @Basic(optional = false)
    @Column(name = "COMPANY")
    private long company;

    public TgenebaseaccountPK() {
    }

    public TgenebaseaccountPK(String account, long company) {
        this.account = account;
        this.company = company;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public long getCompany() {
        return company;
    }

    public void setCompany(long company) {
        this.company = company;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenebaseaccountPK[ account=" + account + ", company=" + company + " ]";
    }
    
}
