131 lines
3.7 KiB
Java
131 lines
3.7 KiB
Java
/*
|
|
* 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;
|
|
|
|
/**
|
|
*
|
|
* @author Rafius
|
|
*/
|
|
@Entity
|
|
@SequenceGenerator(name = "PROD_CLASESERVICIO_SEQ", sequenceName = "PROD_CLASESERVICIO_SEQ", allocationSize = 1)
|
|
@Table(name = "PROD_CLASESERVICIO")
|
|
public class ProdClaseServicio implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PROD_CLASESERVICIO_SEQ")
|
|
@Column(name = "PRODCLASESERVICIO_ID")
|
|
private Integer prodclaseservicioId;
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
@JoinColumn(name = "PRODUCTOSERVICIO_ID", referencedColumnName = "PRODUCTOSERVICIO_ID")
|
|
@ManyToOne
|
|
private ProductoServicio productoServicio;
|
|
@JoinColumn(name = "CLASESERVICIO_ID", referencedColumnName = "CLASESERVICIO_ID")
|
|
@ManyToOne
|
|
private ClaseServicio claseServicio;
|
|
|
|
public ProdClaseServicio() {
|
|
}
|
|
|
|
public ProdClaseServicio(Integer prodclaseservicioId) {
|
|
this.prodclaseservicioId = prodclaseservicioId;
|
|
}
|
|
|
|
public Integer getProdclaseservicioId() {
|
|
return prodclaseservicioId;
|
|
}
|
|
|
|
public void setProdclaseservicioId(Integer prodclaseservicioId) {
|
|
this.prodclaseservicioId = prodclaseservicioId;
|
|
}
|
|
|
|
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 ProductoServicio getProductoServicio() {
|
|
return productoServicio;
|
|
}
|
|
|
|
public void setProductoServicio(ProductoServicio productoServicio) {
|
|
this.productoServicio = productoServicio;
|
|
}
|
|
|
|
public ClaseServicio getClaseServicio() {
|
|
return claseServicio;
|
|
}
|
|
|
|
public void setClaseServicio(ClaseServicio claseServicio) {
|
|
this.claseServicio = claseServicio;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (prodclaseservicioId != null ? prodclaseservicioId.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 ProdClaseServicio)) {
|
|
return false;
|
|
}
|
|
ProdClaseServicio other = (ProdClaseServicio) object;
|
|
if ((this.prodclaseservicioId == null && other.prodclaseservicioId != null) || (this.prodclaseservicioId != null && !this.prodclaseservicioId.equals(other.prodclaseservicioId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.utilerias.ProdClaseservicio[prodclaseservicioId=" + prodclaseservicioId + "]";
|
|
}
|
|
}
|