/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package conexionCredibanco.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author viatori
 */
@Entity
@Table(name = "tbl_franquicias_empresa")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblFranquiciasEmpresa.findAll", query = "SELECT t FROM TblFranquiciasEmpresa t")
    , @NamedQuery(name = "TblFranquiciasEmpresa.findByIdItem", query = "SELECT t FROM TblFranquiciasEmpresa t WHERE t.idItem = :idItem")
    , @NamedQuery(name = "TblFranquiciasEmpresa.findByCodEmpresa", query = "SELECT t FROM TblFranquiciasEmpresa t WHERE t.codEmpresa = :codEmpresa")
    , @NamedQuery(name = "TblFranquiciasEmpresa.findByIdFranquicia", query = "SELECT t FROM TblFranquiciasEmpresa t WHERE t.idFranquicia = :idFranquicia")})
public class TblFranquiciasEmpresa implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_item")
    private Long idItem;
    @Column(name = "cod_empresa")
    private String codEmpresa;
    @Column(name = "id_franquicia")
    private String idFranquicia;

    public TblFranquiciasEmpresa() {
    }

    public TblFranquiciasEmpresa(Long idItem) {
        this.idItem = idItem;
    }

    public Long getIdItem() {
        return idItem;
    }

    public void setIdItem(Long idItem) {
        this.idItem = idItem;
    }

    public String getCodEmpresa() {
        return codEmpresa;
    }

    public void setCodEmpresa(String codEmpresa) {
        this.codEmpresa = codEmpresa;
    }

    public String getIdFranquicia() {
        return idFranquicia;
    }

    public void setIdFranquicia(String idFranquicia) {
        this.idFranquicia = idFranquicia;
    }

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

    @Override
    public String toString() {
        return "conexionCredibanco.entity.TblFranquiciasEmpresa[ idItem=" + idItem + " ]";
    }
    
}
