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

    @Basic(optional = false)
    @Column(name = "MENUCODE")
    private int menucode;
    @Basic(optional = false)
    @Column(name = "LEVELCODE")
    private int levelcode;

    public TgenemenulevelPK() {
    }

    public TgenemenulevelPK(int menucode, int levelcode) {
        this.menucode = menucode;
        this.levelcode = levelcode;
    }

    public int getMenucode() {
        return menucode;
    }

    public void setMenucode(int menucode) {
        this.menucode = menucode;
    }

    public int getLevelcode() {
        return levelcode;
    }

    public void setLevelcode(int levelcode) {
        this.levelcode = levelcode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) menucode;
        hash += (int) levelcode;
        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 TgenemenulevelPK)) {
            return false;
        }
        TgenemenulevelPK other = (TgenemenulevelPK) object;
        if (this.menucode != other.menucode) {
            return false;
        }
        if (this.levelcode != other.levelcode) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenemenulevelPK[ menucode=" + menucode + ", levelcode=" + levelcode + " ]";
    }
    
}
