Created
February 15, 2018 15:07
-
-
Save ajfmo/e87e9c9c124726547247ff9dc1694310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ajfmo.sislic.entities; | |
// Generated 05/12/2017 10:46:05 PM by Hibernate Tools 5.2.5.Final | |
import javax.persistence.CascadeType; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.FetchType; | |
import javax.persistence.Id; | |
import javax.persistence.JoinColumn; | |
import javax.persistence.ManyToOne; | |
import javax.persistence.Table; | |
import javax.persistence.UniqueConstraint; | |
/** | |
* Productos generated by hbm2java | |
*/ | |
@Entity | |
@Table(name = "productos", catalog = "sili", uniqueConstraints = @UniqueConstraint(columnNames = "descrip")) | |
public class Productos implements java.io.Serializable { | |
private static final long serialVersionUID = -805803452313923342L; | |
@Id | |
@Column(name = "codigo", unique = true, nullable = false, length = 11) | |
private String codigo; | |
@Column(name = "descrip", unique = true, nullable = false, length = 45) | |
private String descrip; | |
@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | |
@JoinColumn(name = "familia", referencedColumnName = "descripcion", nullable = false) | |
private Familia familia; | |
@Column(name = "costo", precision = 22, scale = 0) | |
private double costo; | |
@Column(name = "precio", precision = 22, scale = 0) | |
private double precio; | |
@Column(name = "existencia", precision = 22, scale = 0) | |
private double existencia; | |
/** | |
* | |
*/ | |
public Productos() { | |
// TODO Auto-generated constructor stub | |
} | |
/** | |
* @param codigo | |
* @param descrip | |
* @param familia | |
* @param costo | |
* @param precio | |
*/ | |
public Productos(String codigo, String descrip, Familia familia, double costo, double precio) { | |
this.codigo = codigo; | |
this.descrip = descrip; | |
this.familia = familia; | |
this.costo = costo; | |
this.precio = precio; | |
} | |
/** | |
* @return the codigo | |
*/ | |
public String getCodigo() { | |
return codigo; | |
} | |
/** | |
* @param codigo | |
* the codigo to set | |
*/ | |
public void setCodigo(String codigo) { | |
this.codigo = codigo; | |
} | |
/** | |
* @return the descrip | |
*/ | |
public String getDescrip() { | |
return descrip; | |
} | |
/** | |
* @param descrip | |
* the descrip to set | |
*/ | |
public void setDescrip(String descrip) { | |
this.descrip = descrip; | |
} | |
/** | |
* @return the familia | |
*/ | |
public Familia getFamilia() { | |
return familia; | |
} | |
/** | |
* @param familia | |
* the familia to set | |
*/ | |
public void setFamilia(Familia familia) { | |
this.familia = familia; | |
} | |
/** | |
* @return the costo | |
*/ | |
public double getCosto() { | |
return costo; | |
} | |
/** | |
* @param costo | |
* the costo to set | |
*/ | |
public void setCosto(double costo) { | |
this.costo = costo; | |
} | |
/** | |
* @return the precio | |
*/ | |
public double getPrecio() { | |
return precio; | |
} | |
/** | |
* @param precio | |
* the precio to set | |
*/ | |
public void setPrecio(double precio) { | |
this.precio = precio; | |
} | |
/** | |
* @return the existencia | |
*/ | |
public double getExistencia() { | |
return existencia; | |
} | |
/** | |
* @param existencia | |
* the existencia to set | |
*/ | |
public void setExistencia(double existencia) { | |
this.existencia = existencia; | |
} | |
/* | |
* (non-Javadoc) | |
* | |
* @see java.lang.Object#toString() | |
*/ | |
@Override | |
public String toString() { | |
return "Productos [codigo=" + codigo + ", descrip=" + descrip + ", familia=" + familia + ", costo=" + costo | |
+ ", precio=" + precio + "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment