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

    @Basic(optional = false)
    @Column(name = "CODE")
    private short code;
    @Basic(optional = false)
    @Column(name = "STRUCTURECODE")
    private String structurecode;

    public TgenemessagestructureheaderPK() {
    }

    public TgenemessagestructureheaderPK(short code, String structurecode) {
        this.code = code;
        this.structurecode = structurecode;
    }

    public short getCode() {
        return code;
    }

    public void setCode(short code) {
        this.code = code;
    }

    public String getStructurecode() {
        return structurecode;
    }

    public void setStructurecode(String structurecode) {
        this.structurecode = structurecode;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenemessagestructureheaderPK[ code=" + code + ", structurecode=" + structurecode + " ]";
    }
    
}
