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

    @Basic(optional = false)
    @Column(name = "CARMA")
    private String carma;
    @Basic(optional = false)
    @Column(name = "CTAG")
    private String ctag;

    public TarmtagarmaPK() {
    }

    public TarmtagarmaPK(String carma, String ctag) {
        this.carma = carma;
        this.ctag = ctag;
    }

    public String getCarma() {
        return carma;
    }

    public void setCarma(String carma) {
        this.carma = carma;
    }

    public String getCtag() {
        return ctag;
    }

    public void setCtag(String ctag) {
        this.ctag = ctag;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TarmtagarmaPK[ carma=" + carma + ", ctag=" + ctag + " ]";
    }
    
}
