package entities; // Generated Feb 24, 2010 4:38:04 PM by Hibernate Tools 3.2.6.CR1 import java.util.HashSet; import java.util.Set; 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.OneToMany; import javax.persistence.Table; /** * Products generated by hbm2java */ @Entity @Table(name = "PRODUCTS", schema = "PUBLIC") public class Products implements java.io.Serializable { private String productcode; private Productlines productlines; private String productname; private String productscale; private String productvendor; private String productdescription; private short quantityinstock; private double buyprice; private double msrp; private Set orderdetailses = new HashSet(0); public Products() { } public Products(String productcode, Productlines productlines, String productname, String productscale, String productvendor, String productdescription, short quantityinstock, double buyprice, double msrp) { this.productcode = productcode; this.productlines = productlines; this.productname = productname; this.productscale = productscale; this.productvendor = productvendor; this.productdescription = productdescription; this.quantityinstock = quantityinstock; this.buyprice = buyprice; this.msrp = msrp; } public Products(String productcode, Productlines productlines, String productname, String productscale, String productvendor, String productdescription, short quantityinstock, double buyprice, double msrp, Set orderdetailses) { this.productcode = productcode; this.productlines = productlines; this.productname = productname; this.productscale = productscale; this.productvendor = productvendor; this.productdescription = productdescription; this.quantityinstock = quantityinstock; this.buyprice = buyprice; this.msrp = msrp; this.orderdetailses = orderdetailses; } @Id @Column(name = "PRODUCTCODE", unique = true, nullable = false, length = 15) public String getProductcode() { return this.productcode; } public void setProductcode(String productcode) { this.productcode = productcode; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "PRODUCTLINE", nullable = false) public Productlines getProductlines() { return this.productlines; } public void setProductlines(Productlines productlines) { this.productlines = productlines; } @Column(name = "PRODUCTNAME", nullable = false, length = 70) public String getProductname() { return this.productname; } public void setProductname(String productname) { this.productname = productname; } @Column(name = "PRODUCTSCALE", nullable = false, length = 10) public String getProductscale() { return this.productscale; } public void setProductscale(String productscale) { this.productscale = productscale; } @Column(name = "PRODUCTVENDOR", nullable = false, length = 50) public String getProductvendor() { return this.productvendor; } public void setProductvendor(String productvendor) { this.productvendor = productvendor; } @Column(name = "PRODUCTDESCRIPTION", nullable = false, length = 4000) public String getProductdescription() { return this.productdescription; } public void setProductdescription(String productdescription) { this.productdescription = productdescription; } @Column(name = "QUANTITYINSTOCK", nullable = false) public short getQuantityinstock() { return this.quantityinstock; } public void setQuantityinstock(short quantityinstock) { this.quantityinstock = quantityinstock; } @Column(name = "BUYPRICE", nullable = false, precision = 0, scale = 0) public double getBuyprice() { return this.buyprice; } public void setBuyprice(double buyprice) { this.buyprice = buyprice; } @Column(name = "MSRP", nullable = false, precision = 0, scale = 0) public double getMsrp() { return this.msrp; } public void setMsrp(double msrp) { this.msrp = msrp; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "products") public Set getOrderdetailses() { return this.orderdetailses; } public void setOrderdetailses(Set orderdetailses) { this.orderdetailses = orderdetailses; } }