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

import org.apache.commons.lang.BooleanUtils;

/**
 * 
 * @author Rafius
 */
@Entity
@SequenceGenerator(name = "PRICING_DIA_SEQ", sequenceName = "PRICING_DIA_SEQ", allocationSize = 1)
@Table(name = "PRICING_DIA")
public class PricingDia implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRICING_DIA_SEQ")
	@Column(name = "PRICINGDIA_ID")
	private Integer pricingdiaId;
	@Column(name = "INDLUNES")
	private Boolean indlunes;
	@Column(name = "INDMARTES")
	private Boolean indmartes;
	@Column(name = "INDMIERCOLES")
	private Boolean indmiercoles;
	@Column(name = "INDJUEVES")
	private Boolean indjueves;
	@Column(name = "INDVIERNES")
	private Boolean indviernes;
	@Column(name = "INDSABADO")
	private Boolean indsabado;
	@Column(name = "INDDOMINGO")
	private Boolean inddomingo;
	@Column(name = "HORARIOINICIO")
	@Temporal(TemporalType.TIMESTAMP)
	// Fue cambido de TIME para TIMESTAMP porque cuando está time el ao que se salva el 1900 y no 1970.
	private Date horarioinicio;
	@Column(name = "HORARIOFIN")
	@Temporal(TemporalType.TIMESTAMP)
	// Fue cambido de TIME para TIMESTAMP porque cuando está time el ao que se salva el 1900 y no 1970.
	private Date horariofin;
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	@Column(name = "ACTIVO")
	private Integer activo;
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;
	@Column(name = "INDFECVIAJE")
	private Boolean indfecviaje;
	@Column(name = "INDFECVENTA")
	private Boolean indfecventa;
	@JoinColumn(name = "PRICING_ID", referencedColumnName = "PRICING_ID")
	@ManyToOne
	private Pricing pricing;

	public PricingDia() {
	}

	public PricingDia(Integer pricingdiaId) {
		this.pricingdiaId = pricingdiaId;
	}

	public Integer getPricingdiaId() {
		return pricingdiaId;
	}

	public void setPricingdiaId(Integer pricingdiaId) {
		this.pricingdiaId = pricingdiaId;
	}

	public Boolean getInddomingo() {
		return BooleanUtils.toBoolean(inddomingo);
	}

	public void setInddomingo(Boolean inddomingo) {
		this.inddomingo = inddomingo;
	}

	public Boolean getIndjueves() {
		return BooleanUtils.toBoolean(indjueves);
	}

	public void setIndjueves(Boolean indjueves) {
		this.indjueves = indjueves;
	}

	public Boolean getIndlunes() {
		return BooleanUtils.toBoolean(indlunes);
	}

	public void setIndlunes(Boolean indlunes) {
		this.indlunes = indlunes;
	}

	public Boolean getIndmartes() {
		return BooleanUtils.toBoolean(indmartes);
	}

	public void setIndmartes(Boolean indmartes) {
		this.indmartes = indmartes;
	}

	public Boolean getIndmiercoles() {
		return BooleanUtils.toBoolean(indmiercoles);
	}

	public void setIndmiercoles(Boolean indmiercoles) {
		this.indmiercoles = indmiercoles;
	}

	public Boolean getIndsabado() {
		return BooleanUtils.toBoolean(indsabado);
	}

	public void setIndsabado(Boolean indsabado) {
		this.indsabado = indsabado;
	}

	public Boolean getIndviernes() {
		return BooleanUtils.toBoolean(indviernes);
	}

	public void setIndviernes(Boolean indviernes) {
		this.indviernes = indviernes;
	}

	public Date getHorarioinicio() {
		return horarioinicio;
	}

	public void setHorarioinicio(Date horarioinicio) {
		this.horarioinicio = horarioinicio;
	}

	public Date getHorariofin() {
		return horariofin;
	}

	public void setHorariofin(Date horariofin) {
		this.horariofin = horariofin;
	}

	public Date getFecmodif() {
		return fecmodif;
	}

	public void setFecmodif(Date fecmodif) {
		this.fecmodif = fecmodif;
	}

	public Integer getActivo() {
		return activo;
	}

	public void setActivo(Integer activo) {
		this.activo = activo;
	}

	public Integer getUsuarioId() {
		return usuarioId;
	}

	public void setUsuarioId(Integer usuarioId) {
		this.usuarioId = usuarioId;
	}

	public Boolean getIndfecviaje() {
		return indfecviaje;
	}

	public void setIndfecviaje(Boolean indfecviaje) {
		this.indfecviaje = indfecviaje;
	}

	public Boolean getIndfecventa() {
		return BooleanUtils.toBoolean(indfecventa);
	}

	public void setIndfecventa(Boolean indfecventa) {
		this.indfecventa = indfecventa;
	}

	public Pricing getPricing() {
		return pricing;
	}

	public void setPricing(Pricing pricing) {
		this.pricing = pricing;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (pricingdiaId != null ? pricingdiaId.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		if (!(object instanceof PricingDia)) {
			return false;
		}
		PricingDia other = (PricingDia) object;
		if ((this.pricingdiaId == null && other.pricingdiaId != null) || (this.pricingdiaId != null && !this.pricingdiaId.equals(other.pricingdiaId))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "entidad.test.PricingDia[pricingdiaId=" + pricingdiaId + "]";
	}
}
