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

    @Basic(optional = false)
    @Column(name = "COCTR_CODIGO")
    private String coctrCodigo;
    @Basic(optional = false)
    @Column(name = "CODTR_CODIGO")
    private String codtrCodigo;

    public TarmcomeTransaccionDetallePK() {
    }

    public TarmcomeTransaccionDetallePK(String coctrCodigo, String codtrCodigo) {
        this.coctrCodigo = coctrCodigo;
        this.codtrCodigo = codtrCodigo;
    }

    public String getCoctrCodigo() {
        return coctrCodigo;
    }

    public void setCoctrCodigo(String coctrCodigo) {
        this.coctrCodigo = coctrCodigo;
    }

    public String getCodtrCodigo() {
        return codtrCodigo;
    }

    public void setCodtrCodigo(String codtrCodigo) {
        this.codtrCodigo = codtrCodigo;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TarmcomeTransaccionDetallePK[ coctrCodigo=" + coctrCodigo + ", codtrCodigo=" + codtrCodigo + " ]";
    }
    
}
