/*
 * 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.math.BigInteger;
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.TGENEMODULE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenemodule.findAll", query = "SELECT t FROM Tgenemodule t"),
    @NamedQuery(name = "Tgenemodule.findByModulecode", query = "SELECT t FROM Tgenemodule t WHERE t.modulecode = :modulecode"),
    @NamedQuery(name = "Tgenemodule.findByRecordversion", query = "SELECT t FROM Tgenemodule t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenemodule.findByDescription", query = "SELECT t FROM Tgenemodule t WHERE t.description = :description"),
    @NamedQuery(name = "Tgenemodule.findByIsvisible", query = "SELECT t FROM Tgenemodule t WHERE t.isvisible = :isvisible")})
public class Tgenemodule implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "MODULECODE")
    private String modulecode;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Basic(optional = false)
    @Column(name = "DESCRIPTION")
    private String description;
    @Column(name = "ISVISIBLE")
    private String isvisible;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgeneaccountstatus> tgeneaccountstatusCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgeneinstallmenttype> tgeneinstallmenttypeCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgenetransaction> tgenetransactionCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgeneproduct> tgeneproductCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgeneconcept> tgeneconceptCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgenebatch> tgenebatchCollection;
    @OneToMany(mappedBy = "modulecode")
    private Collection<Tgenebalancetype> tgenebalancetypeCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgenemoduledesc> tgenemoduledescCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemodule")
    private Collection<Tgenereport> tgenereportCollection;

    public Tgenemodule() {
    }

    public Tgenemodule(String modulecode) {
        this.modulecode = modulecode;
    }

    public Tgenemodule(String modulecode, String description) {
        this.modulecode = modulecode;
        this.description = description;
    }

    public String getModulecode() {
        return modulecode;
    }

    public void setModulecode(String modulecode) {
        this.modulecode = modulecode;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

    public void setRecordversion(BigInteger recordversion) {
        this.recordversion = recordversion;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getIsvisible() {
        return isvisible;
    }

    public void setIsvisible(String isvisible) {
        this.isvisible = isvisible;
    }

    @XmlTransient
    public Collection<Tgeneaccountstatus> getTgeneaccountstatusCollection() {
        return tgeneaccountstatusCollection;
    }

    public void setTgeneaccountstatusCollection(Collection<Tgeneaccountstatus> tgeneaccountstatusCollection) {
        this.tgeneaccountstatusCollection = tgeneaccountstatusCollection;
    }

    @XmlTransient
    public Collection<Tgeneinstallmenttype> getTgeneinstallmenttypeCollection() {
        return tgeneinstallmenttypeCollection;
    }

    public void setTgeneinstallmenttypeCollection(Collection<Tgeneinstallmenttype> tgeneinstallmenttypeCollection) {
        this.tgeneinstallmenttypeCollection = tgeneinstallmenttypeCollection;
    }

    @XmlTransient
    public Collection<Tgenetransaction> getTgenetransactionCollection() {
        return tgenetransactionCollection;
    }

    public void setTgenetransactionCollection(Collection<Tgenetransaction> tgenetransactionCollection) {
        this.tgenetransactionCollection = tgenetransactionCollection;
    }

    @XmlTransient
    public Collection<Tgeneproduct> getTgeneproductCollection() {
        return tgeneproductCollection;
    }

    public void setTgeneproductCollection(Collection<Tgeneproduct> tgeneproductCollection) {
        this.tgeneproductCollection = tgeneproductCollection;
    }

    @XmlTransient
    public Collection<Tgeneconcept> getTgeneconceptCollection() {
        return tgeneconceptCollection;
    }

    public void setTgeneconceptCollection(Collection<Tgeneconcept> tgeneconceptCollection) {
        this.tgeneconceptCollection = tgeneconceptCollection;
    }

    @XmlTransient
    public Collection<Tgenebatch> getTgenebatchCollection() {
        return tgenebatchCollection;
    }

    public void setTgenebatchCollection(Collection<Tgenebatch> tgenebatchCollection) {
        this.tgenebatchCollection = tgenebatchCollection;
    }

    @XmlTransient
    public Collection<Tgenebalancetype> getTgenebalancetypeCollection() {
        return tgenebalancetypeCollection;
    }

    public void setTgenebalancetypeCollection(Collection<Tgenebalancetype> tgenebalancetypeCollection) {
        this.tgenebalancetypeCollection = tgenebalancetypeCollection;
    }

    @XmlTransient
    public Collection<Tgenemoduledesc> getTgenemoduledescCollection() {
        return tgenemoduledescCollection;
    }

    public void setTgenemoduledescCollection(Collection<Tgenemoduledesc> tgenemoduledescCollection) {
        this.tgenemoduledescCollection = tgenemoduledescCollection;
    }

    @XmlTransient
    public Collection<Tgenereport> getTgenereportCollection() {
        return tgenereportCollection;
    }

    public void setTgenereportCollection(Collection<Tgenereport> tgenereportCollection) {
        this.tgenereportCollection = tgenereportCollection;
    }

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

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