/*
 * 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.math.BigDecimal;
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.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author gleimar
 */
@Entity
@SequenceGenerator(name = "TAXA_EMBARQUE_PARADA_SEQ", sequenceName = "TAXA_EMBARQUE_PARADA_SEQ", allocationSize = 1)
@Table(name = "TAXA_EMBARQUE_PARADA")
public class TaxaEmbarqueParada implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "TAXA_EMBARQUE_PARADA_SEQ")
    @Column(name = "TAXAEMBARQUEPARADA_ID")
    private Integer taxaembarqueparadaId;
    @Basic(optional = false)
    @Column(name = "INDTIPO")
    private char indtipo;
    @Column(name = "KMATE")
    private Integer kmate;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "VALORTAXA")
    private BigDecimal valortaxa;
    @JoinColumn(name = "PARADA_ID", referencedColumnName = "PARADA_ID")
    @ManyToOne
    private Parada paradaId;
    @JoinColumn(name = "ORGAOCONCEDENTE_ID", referencedColumnName = "ORGAOCONCEDENTE_ID")
    @ManyToOne
    private OrgaoConcedente orgaoconcedenteId;
    @JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
    @ManyToOne
    private Empresa empresa;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;

    public TaxaEmbarqueParada() {
    }

    public TaxaEmbarqueParada(Integer taxaembarqueparadaId) {
        this.taxaembarqueparadaId = taxaembarqueparadaId;
    }

    public TaxaEmbarqueParada(Integer taxaembarqueparadaId, char indtipo) {
        this.taxaembarqueparadaId = taxaembarqueparadaId;
        this.indtipo = indtipo;
    }

    public Integer getTaxaembarqueparadaId() {
        return taxaembarqueparadaId;
    }

    public void setTaxaembarqueparadaId(Integer taxaembarqueparadaId) {
        this.taxaembarqueparadaId = taxaembarqueparadaId;
    }

    public char getIndtipo() {
        return indtipo;
    }

    public void setIndtipo(char indtipo) {
        this.indtipo = indtipo;
    }

    public Integer getKmate() {
        return kmate;
    }

    public void setKmate(Integer kmate) {
        this.kmate = kmate;
    }

    public BigDecimal getValortaxa() {
        return valortaxa;
    }

    public void setValortaxa(BigDecimal valortaxa) {
        this.valortaxa = valortaxa;
    }

    public Parada getParadaId() {
        return paradaId;
    }

    public void setParadaId(Parada paradaId) {
        this.paradaId = paradaId;
    }

    public OrgaoConcedente getOrgaoconcedenteId() {
        return orgaoconcedenteId;
    }

    public void setOrgaoconcedenteId(OrgaoConcedente orgaoconcedenteId) {
        this.orgaoconcedenteId = orgaoconcedenteId;
    }

    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;
    }
    

    public Empresa getEmpresa() {
		return empresa;
	}

	public void setEmpresa(Empresa empresa) {
		this.empresa = empresa;
	}

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

    @Override
    public String toString() {
        return "com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada[ taxaembarqueparadaId=" + taxaembarqueparadaId + " ]";
    }
}
