/*
 * 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.TARMCENCONTROLJUR")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmcencontroljur.findAll", query = "SELECT t FROM Tarmcencontroljur t"),
    @NamedQuery(name = "Tarmcencontroljur.findByCjurisdiccion", query = "SELECT t FROM Tarmcencontroljur t WHERE t.cjurisdiccion = :cjurisdiccion")})
public class Tarmcencontroljur implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CJURISDICCION")
    private Long cjurisdiccion;
    @JoinColumn(name = "CCENTROCONTROL", referencedColumnName = "CCENTROCONTROL")
    @ManyToOne
    private Tarmcentrocontrol ccentrocontrol;
    @JoinColumns({
        @JoinColumn(name = "COUNTRYCODE", referencedColumnName = "COUNTRYCODE"),
        @JoinColumn(name = "PROVINCECODE", referencedColumnName = "PROVINCECODE")})
    @ManyToOne
    private Tgeneprovince tgeneprovince;

    public Tarmcencontroljur() {
    }

    public Tarmcencontroljur(Long cjurisdiccion) {
        this.cjurisdiccion = cjurisdiccion;
    }

    public Long getCjurisdiccion() {
        return cjurisdiccion;
    }

    public void setCjurisdiccion(Long cjurisdiccion) {
        this.cjurisdiccion = cjurisdiccion;
    }

    public Tarmcentrocontrol getCcentrocontrol() {
        return ccentrocontrol;
    }

    public void setCcentrocontrol(Tarmcentrocontrol ccentrocontrol) {
        this.ccentrocontrol = ccentrocontrol;
    }

    public Tgeneprovince getTgeneprovince() {
        return tgeneprovince;
    }

    public void setTgeneprovince(Tgeneprovince tgeneprovince) {
        this.tgeneprovince = tgeneprovince;
    }

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

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