Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package hello;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Producto {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
private String nombre, codigo;
private Float precio, existencia;
public String getCodigo() {
return codigo;
}
public void setCodigo(String codigo) {
this.codigo = codigo;
}
public Float getPrecio() {
return precio;
}
public void setPrecio(Float precio) {
this.precio = precio;
}
public Float getExistencia() {
return existencia;
}
public void setExistencia(Float existencia) {
this.existencia = existencia;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment