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

    @Basic(optional = false)
    @Column(name = "TABLENAME")
    private String tablename;
    @Basic(optional = false)
    @Column(name = "COLUMNNAME")
    private String columnname;

    public TgenedictionaryPK() {
    }

    public TgenedictionaryPK(String tablename, String columnname) {
        this.tablename = tablename;
        this.columnname = columnname;
    }

    public String getTablename() {
        return tablename;
    }

    public void setTablename(String tablename) {
        this.tablename = tablename;
    }

    public String getColumnname() {
        return columnname;
    }

    public void setColumnname(String columnname) {
        this.columnname = columnname;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenedictionaryPK[ tablename=" + tablename + ", columnname=" + columnname + " ]";
    }
    
}
