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

    @Basic(optional = false)
    @Column(name = "OBJECT_TYPE")
    private String objectType;
    @Basic(optional = false)
    @Column(name = "OBJECT_NAME")
    private String objectName;

    public MdRegistryPK() {
    }

    public MdRegistryPK(String objectType, String objectName) {
        this.objectType = objectType;
        this.objectName = objectName;
    }

    public String getObjectType() {
        return objectType;
    }

    public void setObjectType(String objectType) {
        this.objectType = objectType;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.MdRegistryPK[ objectType=" + objectType + ", objectName=" + objectName + " ]";
    }
    
}
