/*
 * 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 java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TGENEFILES")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenefiles.findAll", query = "SELECT t FROM Tgenefiles t"),
    @NamedQuery(name = "Tgenefiles.findByCode", query = "SELECT t FROM Tgenefiles t WHERE t.code = :code")})
public class Tgenefiles implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CODE")
    private Long code;
    @OneToMany(mappedBy = "codefile")
    private Collection<Tcustsupervisor> tcustsupervisorCollection;
    @OneToMany(mappedBy = "signaturecode")
    private Collection<Tcustpeople> tcustpeopleCollection;
    @OneToMany(mappedBy = "photocode")
    private Collection<Tcustpeople> tcustpeopleCollection1;
    @OneToMany(mappedBy = "origincode")
    private Collection<Tgenefilesdetail> tgenefilesdetailCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenefiles")
    private Collection<Tgenefilesdetail> tgenefilesdetailCollection1;
    @OneToMany(mappedBy = "code")
    private Collection<Tcustpersonbalance> tcustpersonbalanceCollection;
    @OneToMany(mappedBy = "logo")
    private Collection<Tcustcompany> tcustcompanyCollection;

    public Tgenefiles() {
    }

    public Tgenefiles(Long code) {
        this.code = code;
    }

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    @XmlTransient
    public Collection<Tcustsupervisor> getTcustsupervisorCollection() {
        return tcustsupervisorCollection;
    }

    public void setTcustsupervisorCollection(Collection<Tcustsupervisor> tcustsupervisorCollection) {
        this.tcustsupervisorCollection = tcustsupervisorCollection;
    }

    @XmlTransient
    public Collection<Tcustpeople> getTcustpeopleCollection() {
        return tcustpeopleCollection;
    }

    public void setTcustpeopleCollection(Collection<Tcustpeople> tcustpeopleCollection) {
        this.tcustpeopleCollection = tcustpeopleCollection;
    }

    @XmlTransient
    public Collection<Tcustpeople> getTcustpeopleCollection1() {
        return tcustpeopleCollection1;
    }

    public void setTcustpeopleCollection1(Collection<Tcustpeople> tcustpeopleCollection1) {
        this.tcustpeopleCollection1 = tcustpeopleCollection1;
    }

    @XmlTransient
    public Collection<Tgenefilesdetail> getTgenefilesdetailCollection() {
        return tgenefilesdetailCollection;
    }

    public void setTgenefilesdetailCollection(Collection<Tgenefilesdetail> tgenefilesdetailCollection) {
        this.tgenefilesdetailCollection = tgenefilesdetailCollection;
    }

    @XmlTransient
    public Collection<Tgenefilesdetail> getTgenefilesdetailCollection1() {
        return tgenefilesdetailCollection1;
    }

    public void setTgenefilesdetailCollection1(Collection<Tgenefilesdetail> tgenefilesdetailCollection1) {
        this.tgenefilesdetailCollection1 = tgenefilesdetailCollection1;
    }

    @XmlTransient
    public Collection<Tcustpersonbalance> getTcustpersonbalanceCollection() {
        return tcustpersonbalanceCollection;
    }

    public void setTcustpersonbalanceCollection(Collection<Tcustpersonbalance> tcustpersonbalanceCollection) {
        this.tcustpersonbalanceCollection = tcustpersonbalanceCollection;
    }

    @XmlTransient
    public Collection<Tcustcompany> getTcustcompanyCollection() {
        return tcustcompanyCollection;
    }

    public void setTcustcompanyCollection(Collection<Tcustcompany> tcustcompanyCollection) {
        this.tcustcompanyCollection = tcustcompanyCollection;
    }

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

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