/*
 * 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.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TCUSTPERSONPARAMETERSID")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tcustpersonparametersid.findAll", query = "SELECT t FROM Tcustpersonparametersid t"),
    @NamedQuery(name = "Tcustpersonparametersid.findByIdentificationcatalog", query = "SELECT t FROM Tcustpersonparametersid t WHERE t.identificationcatalog = :identificationcatalog"),
    @NamedQuery(name = "Tcustpersonparametersid.findByMaxlength", query = "SELECT t FROM Tcustpersonparametersid t WHERE t.maxlength = :maxlength"),
    @NamedQuery(name = "Tcustpersonparametersid.findByPermitletter", query = "SELECT t FROM Tcustpersonparametersid t WHERE t.permitletter = :permitletter"),
    @NamedQuery(name = "Tcustpersonparametersid.findByNamebean", query = "SELECT t FROM Tcustpersonparametersid t WHERE t.namebean = :namebean")})
public class Tcustpersonparametersid implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDENTIFICATIONCATALOG")
    private String identificationcatalog;
    @Column(name = "MAXLENGTH")
    private Short maxlength;
    @Column(name = "PERMITLETTER")
    private String permitletter;
    @Column(name = "NAMEBEAN")
    private String namebean;
    @JoinColumns({
        @JoinColumn(name = "IDENTIFICATIONCATALOG", referencedColumnName = "CATALOG", insertable = false, updatable = false),
        @JoinColumn(name = "IDENTIFICATIONCATALOGCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne(optional = false)
    private Tgenecatalogdetail tgenecatalogdetail;

    public Tcustpersonparametersid() {
    }

    public Tcustpersonparametersid(String identificationcatalog) {
        this.identificationcatalog = identificationcatalog;
    }

    public String getIdentificationcatalog() {
        return identificationcatalog;
    }

    public void setIdentificationcatalog(String identificationcatalog) {
        this.identificationcatalog = identificationcatalog;
    }

    public Short getMaxlength() {
        return maxlength;
    }

    public void setMaxlength(Short maxlength) {
        this.maxlength = maxlength;
    }

    public String getPermitletter() {
        return permitletter;
    }

    public void setPermitletter(String permitletter) {
        this.permitletter = permitletter;
    }

    public String getNamebean() {
        return namebean;
    }

    public void setNamebean(String namebean) {
        this.namebean = namebean;
    }

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

    public void setTgenecatalogdetail(Tgenecatalogdetail tgenecatalogdetail) {
        this.tgenecatalogdetail = tgenecatalogdetail;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.Tcustpersonparametersid[ identificationcatalog=" + identificationcatalog + " ]";
    }
    
}
