/*
 * 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 = "TIPO_DOMICILIO_SEQ", sequenceName = "TIPO_DOMICILIO_SEQ", allocationSize = 1)
@Table(name = "TIPO_DOMICILIO")
public class TipoDomicilio implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "TIPO_DOMICILIO_SEQ")
    @Column(name = "TIPODOMICILIO_ID")
    private Short tipodomicilioId;
    @Column(name = "CVETIPODOMICILIO")
    private String cvetipodomicilio;
    @Column(name = "DESCTIPO")
    private String desctipo;
    @Column(name = "EQUIVALENCIA_ID")
    private String equivalenciaId;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;

    public TipoDomicilio() {
    }

    public TipoDomicilio(Short tipodomicilioId) {
        this.tipodomicilioId = tipodomicilioId;
    }

    public Short getTipodomicilioId() {
        return tipodomicilioId;
    }

    public void setTipodomicilioId(Short tipodomicilioId) {
        this.tipodomicilioId = tipodomicilioId;
    }

    public String getCvetipodomicilio() {
        return cvetipodomicilio;
    }

    public void setCvetipodomicilio(String cvetipodomicilio) {
        this.cvetipodomicilio = cvetipodomicilio;
    }

    public String getDesctipo() {
        return desctipo;
    }

    public void setDesctipo(String desctipo) {
        this.desctipo = desctipo;
    }

    public String getEquivalenciaId() {
        return equivalenciaId;
    }

    public void setEquivalenciaId(String equivalenciaId) {
        this.equivalenciaId = equivalenciaId;
    }

    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 += (tipodomicilioId != null ? tipodomicilioId.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 TipoDomicilio)) {
            return false;
        }
        TipoDomicilio other = (TipoDomicilio) object;
        if ((this.tipodomicilioId == null && other.tipodomicilioId != null) || (this.tipodomicilioId != null && !this.tipodomicilioId.equals(other.tipodomicilioId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return this.desctipo;
    }
}
