/*
 * 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 java.util.Date;
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.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TARMCUSTODIATEMPORAL")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmcustodiatemporal.findAll", query = "SELECT t FROM Tarmcustodiatemporal t"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByCcustemp", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.ccustemp = :ccustemp"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAerolinea", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aerolinea = :aerolinea"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAerolineacode", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aerolineacode = :aerolineacode"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAeropuertoorig", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aeropuertoorig = :aeropuertoorig"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAeropuertoorigcode", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aeropuertoorigcode = :aeropuertoorigcode"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByCountrycodedest", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.countrycodedest = :countrycodedest"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByProvincecodedest", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.provincecodedest = :provincecodedest"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByCantoncodedest", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.cantoncodedest = :cantoncodedest"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByCitycodedest", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.citycodedest = :citycodedest"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAeropuertodest", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aeropuertodest = :aeropuertodest"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByAeropuertodestcode", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.aeropuertodestcode = :aeropuertodestcode"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByNotransaccion", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.notransaccion = :notransaccion"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByFechacustodios", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.fechacustodios = :fechacustodios"),
    @NamedQuery(name = "Tarmcustodiatemporal.findByVuelo", query = "SELECT t FROM Tarmcustodiatemporal t WHERE t.vuelo = :vuelo")})
public class Tarmcustodiatemporal implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CCUSTEMP")
    private String ccustemp;
    @Column(name = "AEROLINEA")
    private String aerolinea;
    @Column(name = "AEROLINEACODE")
    private String aerolineacode;
    @Column(name = "AEROPUERTOORIG")
    private String aeropuertoorig;
    @Column(name = "AEROPUERTOORIGCODE")
    private String aeropuertoorigcode;
    @Column(name = "COUNTRYCODEDEST")
    private String countrycodedest;
    @Column(name = "PROVINCECODEDEST")
    private String provincecodedest;
    @Column(name = "CANTONCODEDEST")
    private String cantoncodedest;
    @Column(name = "CITYCODEDEST")
    private String citycodedest;
    @Column(name = "AEROPUERTODEST")
    private String aeropuertodest;
    @Column(name = "AEROPUERTODESTCODE")
    private String aeropuertodestcode;
    @Column(name = "NOTRANSACCION")
    private String notransaccion;
    @Column(name = "FECHACUSTODIOS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechacustodios;
    @Column(name = "VUELO")
    private String vuelo;
    @OneToMany(mappedBy = "ccustemp")
    private Collection<Tarmdecomisoarma> tarmdecomisoarmaCollection;
    @JoinColumn(name = "CCENTROCONTROL", referencedColumnName = "CCENTROCONTROL")
    @ManyToOne
    private Tarmcentrocontrol ccentrocontrol;
    @JoinColumn(name = "PERSONCODEPROP", referencedColumnName = "PERSONCODE")
    @ManyToOne
    private Tcustperson personcodeprop;
    @JoinColumn(name = "PERSONCODE", referencedColumnName = "PERSONCODE")
    @ManyToOne
    private Tcustperson personcode;
    @JoinColumns({
        @JoinColumn(name = "TIPOREGISTRO", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "TIPOREGISTROCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail;
    @JoinColumns({
        @JoinColumn(name = "COUNTRYCODEORIGEN", referencedColumnName = "COUNTRYCODE"),
        @JoinColumn(name = "PROVINCECODEORIGEN", referencedColumnName = "PROVINCECODE"),
        @JoinColumn(name = "CANTONCODEORIGEN", referencedColumnName = "CANTONCODE"),
        @JoinColumn(name = "CITYCODEORIGEN", referencedColumnName = "CITYCODE")})
    @ManyToOne
    private Tgenecity tgenecity;

    public Tarmcustodiatemporal() {
    }

    public Tarmcustodiatemporal(String ccustemp) {
        this.ccustemp = ccustemp;
    }

    public String getCcustemp() {
        return ccustemp;
    }

    public void setCcustemp(String ccustemp) {
        this.ccustemp = ccustemp;
    }

    public String getAerolinea() {
        return aerolinea;
    }

    public void setAerolinea(String aerolinea) {
        this.aerolinea = aerolinea;
    }

    public String getAerolineacode() {
        return aerolineacode;
    }

    public void setAerolineacode(String aerolineacode) {
        this.aerolineacode = aerolineacode;
    }

    public String getAeropuertoorig() {
        return aeropuertoorig;
    }

    public void setAeropuertoorig(String aeropuertoorig) {
        this.aeropuertoorig = aeropuertoorig;
    }

    public String getAeropuertoorigcode() {
        return aeropuertoorigcode;
    }

    public void setAeropuertoorigcode(String aeropuertoorigcode) {
        this.aeropuertoorigcode = aeropuertoorigcode;
    }

    public String getCountrycodedest() {
        return countrycodedest;
    }

    public void setCountrycodedest(String countrycodedest) {
        this.countrycodedest = countrycodedest;
    }

    public String getProvincecodedest() {
        return provincecodedest;
    }

    public void setProvincecodedest(String provincecodedest) {
        this.provincecodedest = provincecodedest;
    }

    public String getCantoncodedest() {
        return cantoncodedest;
    }

    public void setCantoncodedest(String cantoncodedest) {
        this.cantoncodedest = cantoncodedest;
    }

    public String getCitycodedest() {
        return citycodedest;
    }

    public void setCitycodedest(String citycodedest) {
        this.citycodedest = citycodedest;
    }

    public String getAeropuertodest() {
        return aeropuertodest;
    }

    public void setAeropuertodest(String aeropuertodest) {
        this.aeropuertodest = aeropuertodest;
    }

    public String getAeropuertodestcode() {
        return aeropuertodestcode;
    }

    public void setAeropuertodestcode(String aeropuertodestcode) {
        this.aeropuertodestcode = aeropuertodestcode;
    }

    public String getNotransaccion() {
        return notransaccion;
    }

    public void setNotransaccion(String notransaccion) {
        this.notransaccion = notransaccion;
    }

    public Date getFechacustodios() {
        return fechacustodios;
    }

    public void setFechacustodios(Date fechacustodios) {
        this.fechacustodios = fechacustodios;
    }

    public String getVuelo() {
        return vuelo;
    }

    public void setVuelo(String vuelo) {
        this.vuelo = vuelo;
    }

    @XmlTransient
    public Collection<Tarmdecomisoarma> getTarmdecomisoarmaCollection() {
        return tarmdecomisoarmaCollection;
    }

    public void setTarmdecomisoarmaCollection(Collection<Tarmdecomisoarma> tarmdecomisoarmaCollection) {
        this.tarmdecomisoarmaCollection = tarmdecomisoarmaCollection;
    }

    public Tarmcentrocontrol getCcentrocontrol() {
        return ccentrocontrol;
    }

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

    public Tcustperson getPersoncodeprop() {
        return personcodeprop;
    }

    public void setPersoncodeprop(Tcustperson personcodeprop) {
        this.personcodeprop = personcodeprop;
    }

    public Tcustperson getPersoncode() {
        return personcode;
    }

    public void setPersoncode(Tcustperson personcode) {
        this.personcode = personcode;
    }

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

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

    public Tgenecity getTgenecity() {
        return tgenecity;
    }

    public void setTgenecity(Tgenecity tgenecity) {
        this.tgenecity = tgenecity;
    }

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

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