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

    @Basic(optional = false)
    @Column(name = "MENUCODE")
    private int menucode;
    @Basic(optional = false)
    @Column(name = "LEVELCODE")
    private int levelcode;
    @Basic(optional = false)
    @Column(name = "SUBLEVEL")
    private int sublevel;
    @Basic(optional = false)
    @Column(name = "LANGUAGECODE")
    private String languagecode;

    public TgenemenusubleveldescPK() {
    }

    public TgenemenusubleveldescPK(int menucode, int levelcode, int sublevel, String languagecode) {
        this.menucode = menucode;
        this.levelcode = levelcode;
        this.sublevel = sublevel;
        this.languagecode = languagecode;
    }

    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;
    }

    public int getSublevel() {
        return sublevel;
    }

    public void setSublevel(int sublevel) {
        this.sublevel = sublevel;
    }

    public String getLanguagecode() {
        return languagecode;
    }

    public void setLanguagecode(String languagecode) {
        this.languagecode = languagecode;
    }

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

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