/*
 * 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.TGENECURRENCY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenecurrency.findAll", query = "SELECT t FROM Tgenecurrency t"),
    @NamedQuery(name = "Tgenecurrency.findByCurrencycode", query = "SELECT t FROM Tgenecurrency t WHERE t.currencycode = :currencycode"),
    @NamedQuery(name = "Tgenecurrency.findByRecordversion", query = "SELECT t FROM Tgenecurrency t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenecurrency.findByPresision", query = "SELECT t FROM Tgenecurrency t WHERE t.presision = :presision"),
    @NamedQuery(name = "Tgenecurrency.findByDescription", query = "SELECT t FROM Tgenecurrency t WHERE t.description = :description")})
public class Tgenecurrency implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Basic(optional = false)
    @Column(name = "PRESISION")
    private short presision;
    @Basic(optional = false)
    @Column(name = "DESCRIPTION")
    private String description;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenecurrencyrate> tgenecurrencyrateCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenedenomination> tgenedenominationCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustcompanyclient> tcustcompanyclientCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustcompanyfinancial> tcustcompanyfinancialCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenecurrencydesc> tgenecurrencydescCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeopleloan> tcustpeopleloanCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenechargesgroup> tgenechargesgroupCollection;
    @OneToMany(mappedBy = "chargecurrencycode")
    private Collection<Tgenechargesgroup> tgenechargesgroupCollection1;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenebaserate> tgenebaserateCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeopleotherassets> tcustpeopleotherassetsCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenesubproductcharges> tgenesubproductchargesCollection;
    @OneToMany(mappedBy = "chargecurrencycode")
    private Collection<Tgenesubproductcharges> tgenesubproductchargesCollection1;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenecharges> tgenechargesCollection;
    @OneToMany(mappedBy = "chargecurrencycode")
    private Collection<Tgenecharges> tgenechargesCollection1;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeoplefixedincome> tcustpeoplefixedincomeCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeopleincome> tcustpeopleincomeCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenesubproductcurrency> tgenesubproductcurrencyCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenechargescheckbook> tgenechargescheckbookCollection;
    @OneToMany(mappedBy = "chargecurrencycode")
    private Collection<Tgenechargescheckbook> tgenechargescheckbookCollection1;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpersonbankreference> tcustpersonbankreferenceCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustcompanyprovider> tcustcompanyproviderCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeopleexpenses> tcustpeopleexpensesCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeopletradereferences> tcustpeopletradereferencesCollection;
    @OneToMany(mappedBy = "legalcurrency")
    private Collection<Tgenecompany> tgenecompanyCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpersonbalance> tcustpersonbalanceCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeoplevehicle> tcustpeoplevehicleCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tsafeprofilehoraryamount> tsafeprofilehoraryamountCollection;
    @OneToMany(mappedBy = "currencycode")
    private Collection<Tcustpeoplerealassets> tcustpeoplerealassetsCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenecurrency")
    private Collection<Tgenecurrencyrategroup> tgenecurrencyrategroupCollection;

    public Tgenecurrency() {
    }

    public Tgenecurrency(String currencycode) {
        this.currencycode = currencycode;
    }

    public Tgenecurrency(String currencycode, short presision, String description) {
        this.currencycode = currencycode;
        this.presision = presision;
        this.description = description;
    }

    public String getCurrencycode() {
        return currencycode;
    }

    public void setCurrencycode(String currencycode) {
        this.currencycode = currencycode;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public short getPresision() {
        return presision;
    }

    public void setPresision(short presision) {
        this.presision = presision;
    }

    public String getDescription() {
        return description;
    }

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

    @XmlTransient
    public Collection<Tgenecurrencyrate> getTgenecurrencyrateCollection() {
        return tgenecurrencyrateCollection;
    }

    public void setTgenecurrencyrateCollection(Collection<Tgenecurrencyrate> tgenecurrencyrateCollection) {
        this.tgenecurrencyrateCollection = tgenecurrencyrateCollection;
    }

    @XmlTransient
    public Collection<Tgenedenomination> getTgenedenominationCollection() {
        return tgenedenominationCollection;
    }

    public void setTgenedenominationCollection(Collection<Tgenedenomination> tgenedenominationCollection) {
        this.tgenedenominationCollection = tgenedenominationCollection;
    }

    @XmlTransient
    public Collection<Tcustcompanyclient> getTcustcompanyclientCollection() {
        return tcustcompanyclientCollection;
    }

    public void setTcustcompanyclientCollection(Collection<Tcustcompanyclient> tcustcompanyclientCollection) {
        this.tcustcompanyclientCollection = tcustcompanyclientCollection;
    }

    @XmlTransient
    public Collection<Tcustcompanyfinancial> getTcustcompanyfinancialCollection() {
        return tcustcompanyfinancialCollection;
    }

    public void setTcustcompanyfinancialCollection(Collection<Tcustcompanyfinancial> tcustcompanyfinancialCollection) {
        this.tcustcompanyfinancialCollection = tcustcompanyfinancialCollection;
    }

    @XmlTransient
    public Collection<Tgenecurrencydesc> getTgenecurrencydescCollection() {
        return tgenecurrencydescCollection;
    }

    public void setTgenecurrencydescCollection(Collection<Tgenecurrencydesc> tgenecurrencydescCollection) {
        this.tgenecurrencydescCollection = tgenecurrencydescCollection;
    }

    @XmlTransient
    public Collection<Tcustpeopleloan> getTcustpeopleloanCollection() {
        return tcustpeopleloanCollection;
    }

    public void setTcustpeopleloanCollection(Collection<Tcustpeopleloan> tcustpeopleloanCollection) {
        this.tcustpeopleloanCollection = tcustpeopleloanCollection;
    }

    @XmlTransient
    public Collection<Tgenechargesgroup> getTgenechargesgroupCollection() {
        return tgenechargesgroupCollection;
    }

    public void setTgenechargesgroupCollection(Collection<Tgenechargesgroup> tgenechargesgroupCollection) {
        this.tgenechargesgroupCollection = tgenechargesgroupCollection;
    }

    @XmlTransient
    public Collection<Tgenechargesgroup> getTgenechargesgroupCollection1() {
        return tgenechargesgroupCollection1;
    }

    public void setTgenechargesgroupCollection1(Collection<Tgenechargesgroup> tgenechargesgroupCollection1) {
        this.tgenechargesgroupCollection1 = tgenechargesgroupCollection1;
    }

    @XmlTransient
    public Collection<Tgenebaserate> getTgenebaserateCollection() {
        return tgenebaserateCollection;
    }

    public void setTgenebaserateCollection(Collection<Tgenebaserate> tgenebaserateCollection) {
        this.tgenebaserateCollection = tgenebaserateCollection;
    }

    @XmlTransient
    public Collection<Tcustpeopleotherassets> getTcustpeopleotherassetsCollection() {
        return tcustpeopleotherassetsCollection;
    }

    public void setTcustpeopleotherassetsCollection(Collection<Tcustpeopleotherassets> tcustpeopleotherassetsCollection) {
        this.tcustpeopleotherassetsCollection = tcustpeopleotherassetsCollection;
    }

    @XmlTransient
    public Collection<Tgenesubproductcharges> getTgenesubproductchargesCollection() {
        return tgenesubproductchargesCollection;
    }

    public void setTgenesubproductchargesCollection(Collection<Tgenesubproductcharges> tgenesubproductchargesCollection) {
        this.tgenesubproductchargesCollection = tgenesubproductchargesCollection;
    }

    @XmlTransient
    public Collection<Tgenesubproductcharges> getTgenesubproductchargesCollection1() {
        return tgenesubproductchargesCollection1;
    }

    public void setTgenesubproductchargesCollection1(Collection<Tgenesubproductcharges> tgenesubproductchargesCollection1) {
        this.tgenesubproductchargesCollection1 = tgenesubproductchargesCollection1;
    }

    @XmlTransient
    public Collection<Tgenecharges> getTgenechargesCollection() {
        return tgenechargesCollection;
    }

    public void setTgenechargesCollection(Collection<Tgenecharges> tgenechargesCollection) {
        this.tgenechargesCollection = tgenechargesCollection;
    }

    @XmlTransient
    public Collection<Tgenecharges> getTgenechargesCollection1() {
        return tgenechargesCollection1;
    }

    public void setTgenechargesCollection1(Collection<Tgenecharges> tgenechargesCollection1) {
        this.tgenechargesCollection1 = tgenechargesCollection1;
    }

    @XmlTransient
    public Collection<Tcustpeoplefixedincome> getTcustpeoplefixedincomeCollection() {
        return tcustpeoplefixedincomeCollection;
    }

    public void setTcustpeoplefixedincomeCollection(Collection<Tcustpeoplefixedincome> tcustpeoplefixedincomeCollection) {
        this.tcustpeoplefixedincomeCollection = tcustpeoplefixedincomeCollection;
    }

    @XmlTransient
    public Collection<Tcustpeopleincome> getTcustpeopleincomeCollection() {
        return tcustpeopleincomeCollection;
    }

    public void setTcustpeopleincomeCollection(Collection<Tcustpeopleincome> tcustpeopleincomeCollection) {
        this.tcustpeopleincomeCollection = tcustpeopleincomeCollection;
    }

    @XmlTransient
    public Collection<Tgenesubproductcurrency> getTgenesubproductcurrencyCollection() {
        return tgenesubproductcurrencyCollection;
    }

    public void setTgenesubproductcurrencyCollection(Collection<Tgenesubproductcurrency> tgenesubproductcurrencyCollection) {
        this.tgenesubproductcurrencyCollection = tgenesubproductcurrencyCollection;
    }

    @XmlTransient
    public Collection<Tgenechargescheckbook> getTgenechargescheckbookCollection() {
        return tgenechargescheckbookCollection;
    }

    public void setTgenechargescheckbookCollection(Collection<Tgenechargescheckbook> tgenechargescheckbookCollection) {
        this.tgenechargescheckbookCollection = tgenechargescheckbookCollection;
    }

    @XmlTransient
    public Collection<Tgenechargescheckbook> getTgenechargescheckbookCollection1() {
        return tgenechargescheckbookCollection1;
    }

    public void setTgenechargescheckbookCollection1(Collection<Tgenechargescheckbook> tgenechargescheckbookCollection1) {
        this.tgenechargescheckbookCollection1 = tgenechargescheckbookCollection1;
    }

    @XmlTransient
    public Collection<Tcustpersonbankreference> getTcustpersonbankreferenceCollection() {
        return tcustpersonbankreferenceCollection;
    }

    public void setTcustpersonbankreferenceCollection(Collection<Tcustpersonbankreference> tcustpersonbankreferenceCollection) {
        this.tcustpersonbankreferenceCollection = tcustpersonbankreferenceCollection;
    }

    @XmlTransient
    public Collection<Tcustcompanyprovider> getTcustcompanyproviderCollection() {
        return tcustcompanyproviderCollection;
    }

    public void setTcustcompanyproviderCollection(Collection<Tcustcompanyprovider> tcustcompanyproviderCollection) {
        this.tcustcompanyproviderCollection = tcustcompanyproviderCollection;
    }

    @XmlTransient
    public Collection<Tcustpeopleexpenses> getTcustpeopleexpensesCollection() {
        return tcustpeopleexpensesCollection;
    }

    public void setTcustpeopleexpensesCollection(Collection<Tcustpeopleexpenses> tcustpeopleexpensesCollection) {
        this.tcustpeopleexpensesCollection = tcustpeopleexpensesCollection;
    }

    @XmlTransient
    public Collection<Tcustpeopletradereferences> getTcustpeopletradereferencesCollection() {
        return tcustpeopletradereferencesCollection;
    }

    public void setTcustpeopletradereferencesCollection(Collection<Tcustpeopletradereferences> tcustpeopletradereferencesCollection) {
        this.tcustpeopletradereferencesCollection = tcustpeopletradereferencesCollection;
    }

    @XmlTransient
    public Collection<Tgenecompany> getTgenecompanyCollection() {
        return tgenecompanyCollection;
    }

    public void setTgenecompanyCollection(Collection<Tgenecompany> tgenecompanyCollection) {
        this.tgenecompanyCollection = tgenecompanyCollection;
    }

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

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

    @XmlTransient
    public Collection<Tcustpeoplevehicle> getTcustpeoplevehicleCollection() {
        return tcustpeoplevehicleCollection;
    }

    public void setTcustpeoplevehicleCollection(Collection<Tcustpeoplevehicle> tcustpeoplevehicleCollection) {
        this.tcustpeoplevehicleCollection = tcustpeoplevehicleCollection;
    }

    @XmlTransient
    public Collection<Tsafeprofilehoraryamount> getTsafeprofilehoraryamountCollection() {
        return tsafeprofilehoraryamountCollection;
    }

    public void setTsafeprofilehoraryamountCollection(Collection<Tsafeprofilehoraryamount> tsafeprofilehoraryamountCollection) {
        this.tsafeprofilehoraryamountCollection = tsafeprofilehoraryamountCollection;
    }

    @XmlTransient
    public Collection<Tcustpeoplerealassets> getTcustpeoplerealassetsCollection() {
        return tcustpeoplerealassetsCollection;
    }

    public void setTcustpeoplerealassetsCollection(Collection<Tcustpeoplerealassets> tcustpeoplerealassetsCollection) {
        this.tcustpeoplerealassetsCollection = tcustpeoplerealassetsCollection;
    }

    @XmlTransient
    public Collection<Tgenecurrencyrategroup> getTgenecurrencyrategroupCollection() {
        return tgenecurrencyrategroupCollection;
    }

    public void setTgenecurrencyrategroupCollection(Collection<Tgenecurrencyrategroup> tgenecurrencyrategroupCollection) {
        this.tgenecurrencyrategroupCollection = tgenecurrencyrategroupCollection;
    }

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

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