/*
 * 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;

@Entity
@SequenceGenerator(name = "TARIFA_EMBARCADA_HIST_SEQ", sequenceName = "TARIFA_EMBARCADA_HIST_SEQ", allocationSize=1)
@Table(name = "TARIFA_EMBARCADA_HIST")
public class TarifaEmbarcadaHist implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "TARIFA_EMBARCADA_HIST_SEQ")
    @Column(name = "TARIFAEMBARCADAHIST_ID")
    private Long tarifaembarcadahistId;
    @Column(name = "PRECIO")
    private BigDecimal precio;
    @Column(name = "PRECIOORIGINAL")
    private BigDecimal preciooriginal;
    @Column(name = "STATUSTARIFA")
    private String statustarifa;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;
    @JoinColumn(name = "VIGENCIATARIFA_ID", referencedColumnName = "VIGENCIATARIFA_ID")
    @ManyToOne
    private VigenciaTarifa vigenciaTarifa;
    @JoinColumn(name = "MONEDA_ID", referencedColumnName = "MONEDA_ID")
    @ManyToOne
    private Moneda moneda;
    @JoinColumn(name = "MARCA_ID", referencedColumnName = "MARCA_ID")
    @ManyToOne
    private Marca marca;
    @JoinColumn(name = "CLASESERVICIO_ID", referencedColumnName = "CLASESERVICIO_ID")
    @ManyToOne
    private ClaseServicio claseServicio;

    public TarifaEmbarcadaHist() {
    }

    public TarifaEmbarcadaHist(Long tarifaembarcadahistId) {
        this.tarifaembarcadahistId = tarifaembarcadahistId;
    }

    public Long getTarifaembarcadahistId() {
		return tarifaembarcadahistId;
	}

    public void setTarifaembarcadahistId(Long tarifaembarcadahistId) {
		this.tarifaembarcadahistId = tarifaembarcadahistId;
	}

    public BigDecimal getPrecio() {
        return precio;
    }

    public void setPrecio(BigDecimal precio) {
        this.precio = precio;
    }

    public BigDecimal getPreciooriginal() {
        return preciooriginal;
    }

    public void setPreciooriginal(BigDecimal preciooriginal) {
        this.preciooriginal = preciooriginal;
    }

    public String getStatustarifa() {
        return statustarifa;
    }

    public void setStatustarifa(String statustarifa) {
        this.statustarifa = statustarifa;
    }

    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 VigenciaTarifa getVigenciaTarifa() {
        return vigenciaTarifa;
    }

    public void setVigenciaTarifa(VigenciaTarifa vigenciaTarifa) {
        this.vigenciaTarifa = vigenciaTarifa;
    }

    public Moneda getMoneda() {
        return moneda;
    }

    public void setMoneda(Moneda moneda) {
        this.moneda = moneda;
    }

    public Marca getMarca() {
        return marca;
    }

    public void setMarca(Marca marca) {
        this.marca = marca;
    }

    public ClaseServicio getClaseServicio() {
        return claseServicio;
    }

    public void setClaseServicio(ClaseServicio claseServicio) {
        this.claseServicio = claseServicio;
    }

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

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