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

/**
 *
 * @author Administrador
 */
@Entity
@SequenceGenerator(name = "RESERVACION_MARCA_SEQ", sequenceName = "RESERVACION_MARCA_SEQ", allocationSize = 1)
@Table(name = "RESERVACION_MARCA")
public class ReservacionMarca implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "RESERVACION_MARCA_SEQ")
    @Column(name = "RESERVACIONMARCA_ID")
    private Integer reservacionmarcaId;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;
    @JoinColumn(name = "RESERVACIONCTRL_ID", referencedColumnName = "RESERVACIONCTRL_ID")
    @ManyToOne
    private ReservacionCtrl reservacionCtrl;
    @JoinColumn(name = "MARCA_ID", referencedColumnName = "MARCA_ID")
    @ManyToOne
    private Marca marca;

    public ReservacionMarca() {
    }

    public ReservacionMarca(Integer reservacionmarcaId) {
        this.reservacionmarcaId = reservacionmarcaId;
    }

    public Integer getReservacionmarcaId() {
        return reservacionmarcaId;
    }

    public void setReservacionmarcaId(Integer reservacionmarcaId) {
        this.reservacionmarcaId = reservacionmarcaId;
    }

    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 ReservacionCtrl getReservacionCtrl() {
        return reservacionCtrl;
    }

    public void setReservacionCtrl(ReservacionCtrl reservacionCtrl) {
        this.reservacionCtrl = reservacionCtrl;
    }

    public Marca getMarca() {
        return marca;
    }

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

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ReservacionMarca other = (ReservacionMarca) obj;
        if (this.activo != other.activo && (this.activo == null || !this.activo.equals(other.activo))) {
            return false;
        }
        if (this.reservacionCtrl != other.reservacionCtrl && (this.reservacionCtrl == null || !this.reservacionCtrl.equals(other.reservacionCtrl))) {
            return false;
        }
        if (this.marca != other.marca && (this.marca == null || !this.marca.equals(other.marca))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 11 * hash + (this.activo != null ? this.activo.hashCode() : 0);
        hash = 11 * hash + (this.reservacionCtrl != null ? this.reservacionCtrl.hashCode() : 0);
        hash = 11 * hash + (this.marca != null ? this.marca.hashCode() : 0);
        return hash;
    }

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