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;

@Entity
@SequenceGenerator(name = "PRICING_CLASSE_TARIFARIA_SEQ", sequenceName = "PRICING_CLASSE_TARIFARIA_SEQ", allocationSize = 1)
@Table(name = "PRICING_CLASSE_TARIFARIA")
public class PricingClasseTarifaria implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRICING_CLASSE_TARIFARIA_SEQ")
	@Column(name = "PRICINGCLASSETARIFARIA_ID")
	private Integer pricingClasseTarifariaId;
	@Column(name = "DESCCLASSE_TARIFARIA")
	private String descClasseTarifaria;
	@Column(name = "SIGLA")
	private String sigla;
	@Basic(optional = false)
	@Column(name = "ACTIVO")
	private Boolean activo;
	@Basic(optional = false)
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	@Basic(optional = false)
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;
	
	public PricingClasseTarifaria() {
		super();
	}
	
	public PricingClasseTarifaria(Integer pricingClasseTarifariaId) {
		this();
		this.pricingClasseTarifariaId = pricingClasseTarifariaId;
	}

	public Integer getPricingClasseTarifariaId() {
		return pricingClasseTarifariaId;
	}

	public void setPricingClasseTarifariaId(Integer pricingClasseTarifariaId) {
		this.pricingClasseTarifariaId = pricingClasseTarifariaId;
	}

	public String getDescClasseTarifaria() {
		return descClasseTarifaria;
	}

	public void setDescClasseTarifaria(String descClasseTarifaria) {
		this.descClasseTarifaria = descClasseTarifaria;
	}

	public String getSigla() {
		return sigla;
	}

	public void setSigla(String sigla) {
		this.sigla = sigla;
	}

	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() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((pricingClasseTarifariaId == null) ? 0 : pricingClasseTarifariaId.hashCode());
		result = prime * result + ((sigla == null) ? 0 : sigla.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PricingClasseTarifaria other = (PricingClasseTarifaria) obj;
		if (pricingClasseTarifariaId == null) {
			if (other.pricingClasseTarifariaId != null)
				return false;
		} else if (!pricingClasseTarifariaId.equals(other.pricingClasseTarifariaId))
			return false;
		if (sigla == null) {
			if (other.sigla != null)
				return false;
		} else if (!sigla.equals(other.sigla))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return descClasseTarifaria + " - " + sigla;
	}

}
