/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.entidad;

import java.io.Serializable;
import java.util.Date;
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.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrador
 */
@Entity
@SequenceGenerator(name = "COMISIONISTA_EXTERNO_SEQ", sequenceName = "COMISIONISTA_EXTERNO_SEQ", allocationSize = 1)
@Table(name = "COMISIONISTA_EXTERNO")
public class ComisionistaExterno implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "COMISIONISTA_EXTERNO_SEQ")
    @Basic(optional = false)
    @Column(name = "COMISIONISTAEXTERNO_ID")
    private Short comisionistaexternoId;
    @Column(name = "DESCCOMISIONISTA")
    private String desccomisionista;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;

    public ComisionistaExterno() {
    }

    public ComisionistaExterno(Short comisionistaexternoId) {
        this.comisionistaexternoId = comisionistaexternoId;
    }

    public Short getComisionistaexternoId() {
        return comisionistaexternoId;
    }

    public void setComisionistaexternoId(Short comisionistaexternoId) {
        this.comisionistaexternoId = comisionistaexternoId;
    }

    public String getDesccomisionista() {
        return desccomisionista;
    }

    public void setDesccomisionista(String desccomisionista) {
        this.desccomisionista = desccomisionista;
    }

    public Boolean getActivo() {
        return activo;
    }

    public void setActivo(Boolean activo) {
        this.activo = activo;
    }

    public Date getFecmodif() {
        return fecmodif;
    }

    public void setFecmodif(Date fecmodif) {
        this.fecmodif = fecmodif;
    }

    public Integer getUsuarioId() {
        return usuarioId;
    }

    public void setUsuarioId(Integer usuarioId) {
        this.usuarioId = usuarioId;
    }

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

    @Override
    public String toString() {
        return getDesccomisionista();
    }
}
