/*
 * 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.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author viatori
 */
@Entity
@Table(name = "ref_franquicias")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "RefFranquicias.findAll", query = "SELECT r FROM RefFranquicias r")
    , @NamedQuery(name = "RefFranquicias.findByIdFranquicia", query = "SELECT r FROM RefFranquicias r WHERE r.idFranquicia = :idFranquicia")
    , @NamedQuery(name = "RefFranquicias.findByFranquicia", query = "SELECT r FROM RefFranquicias r WHERE r.franquicia = :franquicia")
    , @NamedQuery(name = "RefFranquicias.findByCodigo", query = "SELECT r FROM RefFranquicias r WHERE r.codigo = :codigo")})
public class RefFranquicias implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_franquicia")
    private String idFranquicia;
    @Column(name = "franquicia")
    private String franquicia;
    @Column(name = "codigo")
    private String codigo;

    public RefFranquicias() {
    }

    public RefFranquicias(String idFranquicia) {
        this.idFranquicia = idFranquicia;
    }

    public String getIdFranquicia() {
        return idFranquicia;
    }

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

    public String getFranquicia() {
        return franquicia;
    }

    public void setFranquicia(String franquicia) {
        this.franquicia = franquicia;
    }

    public String getCodigo() {
        return codigo;
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

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

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