/*
 * 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_KM_SEQ", sequenceName = "TAXA_EMBARQUE_KM_SEQ", allocationSize = 1)
@Table(name = "TAXA_EMBARQUE_KM")
public class TaxaEmbarqueKm implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "TAXA_EMBARQUE_KM_SEQ")
    @Column(name = "TAXAEMBARQUEKM_ID")
    private Integer taxaembarquekmId;
    @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 = "ORGAOCONCEDENTE_ID", referencedColumnName = "ORGAOCONCEDENTE_ID")
    @ManyToOne
    private OrgaoConcedente orgaoconcedenteId;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;

    public TaxaEmbarqueKm() {
    }

    public TaxaEmbarqueKm(Integer taxaembarquekmId) {
        this.taxaembarquekmId = taxaembarquekmId;
    }

    public Integer getTaxaembarquekmId() {
        return taxaembarquekmId;
    }

    public void setTaxaembarquekmId(Integer taxaembarquekmId) {
        this.taxaembarquekmId = taxaembarquekmId;
    }

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

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

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