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 = "CONF_TOTEM_SEQ", sequenceName = "CONF_TOTEM_SEQ",allocationSize=1)
@Table(name = "CONF_TOTEM")
public class ConfTotem implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "CONF_TOTEM_SEQ")
    @Column(name = "CONFTOTEM_ID")
    private Integer confTotemId;
	@Column(name = "VALOR")
	private String valor;
	@Column(name = "CHAVE")
	private String chave;
	@Column(name = "ACTIVO")
	private Boolean activo;
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;
	
	public Integer getConfTotemId() {
		return confTotemId;
	}
	public void setConfTotemId(Integer confTotemId) {
		this.confTotemId = confTotemId;
	}

	public ConfTotem() {
		super();
	}

	public String getValor() {
		return valor;
	}
	public void setValor(String valor) {
		this.valor = valor;
	}

	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 String getChave() {
		return chave;
	}
	public void setChave(String chave) {
		this.chave = chave;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((confTotemId == null) ? 0 : confTotemId.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;
		ConfTotem other = (ConfTotem) obj;
		if (confTotemId == null) {
			if (other.confTotemId != null)
				return false;
		} else if (!confTotemId.equals(other.confTotemId))
			return false;
		return true;
	}

}
